mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-20 12:19:36 +00:00
Generate SIMD code during build
This commit is contained in:
parent
86a55e2c0a
commit
4e6138d785
2 changed files with 15 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue