mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 21:45:03 +02:00
Generate SIMD code during build
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"go/types"
|
||||
"io"
|
||||
@@ -1184,6 +1185,9 @@ func exit(msg any) {
|
||||
|
||||
func write_file(name, text string) {
|
||||
b := unsafe.Slice(unsafe.StringData(text), len(text))
|
||||
if existing, err := os.ReadFile(name); err == nil && bytes.Equal(existing, b) {
|
||||
return
|
||||
}
|
||||
if err := os.WriteFile(name, b, 0660); err != nil {
|
||||
exit(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user