make clean should clean generated asm as well
This commit is contained in:
parent
9fc3db1dd1
commit
68d800d4fa
4 changed files with 19 additions and 12 deletions
5
.gitattributes
vendored
5
.gitattributes
vendored
|
|
@ -22,6 +22,11 @@ tools/wcswidth/std.go linguist-generated=true
|
||||||
tools/unicode_names/names.txt linguist-generated=true
|
tools/unicode_names/names.txt linguist-generated=true
|
||||||
terminfo/kitty.term* linguist-generated=true
|
terminfo/kitty.term* linguist-generated=true
|
||||||
terminfo/x/* linguist-generated=true
|
terminfo/x/* linguist-generated=true
|
||||||
|
*_generated.h linguist-generated=true
|
||||||
|
*_generated.go linguist-generated=true
|
||||||
|
*_generated_test.go linguist-generated=true
|
||||||
|
*_generated_test.s linguist-generated=true
|
||||||
|
*_generated.s linguist-generated=true
|
||||||
|
|
||||||
*.py text diff=python
|
*.py text diff=python
|
||||||
*.m text diff=objc
|
*.m text diff=objc
|
||||||
|
|
|
||||||
11
setup.py
11
setup.py
|
|
@ -1733,6 +1733,13 @@ def excluded(root: str, d: str) -> bool:
|
||||||
q = os.path.relpath(os.path.join(root, d), src_base).replace(os.sep, '/')
|
q = os.path.relpath(os.path.join(root, d), src_base).replace(os.sep, '/')
|
||||||
return q in ('.git', 'bypy/b', 'dependencies')
|
return q in ('.git', 'bypy/b', 'dependencies')
|
||||||
|
|
||||||
|
def is_generated(f: str) -> bool:
|
||||||
|
e = f.endswith
|
||||||
|
return (
|
||||||
|
e('_generated.h') or e('_generated.go') or e('_generated.bin') or
|
||||||
|
e('_generated.s') or e('_generated_test.s') or e('_generated_test.go')
|
||||||
|
)
|
||||||
|
|
||||||
for root, dirs, files in os.walk(src_base, topdown=True):
|
for root, dirs, files in os.walk(src_base, topdown=True):
|
||||||
dirs[:] = [d for d in dirs if not excluded(root, d)]
|
dirs[:] = [d for d in dirs if not excluded(root, d)]
|
||||||
remove_dirs = {d for d in dirs if d == '__pycache__' or d.endswith('.dSYM')}
|
remove_dirs = {d for d in dirs if d == '__pycache__' or d.endswith('.dSYM')}
|
||||||
|
|
@ -1741,9 +1748,7 @@ def excluded(root: str, d: str) -> bool:
|
||||||
dirs.remove(d)
|
dirs.remove(d)
|
||||||
for f in files:
|
for f in files:
|
||||||
ext = f.rpartition('.')[-1]
|
ext = f.rpartition('.')[-1]
|
||||||
if ext in ('so', 'dylib', 'pyc', 'pyo') or (not for_cross_compile and (
|
if ext in ('so', 'dylib', 'pyc', 'pyo') or (not for_cross_compile and is_generated(f)):
|
||||||
f.endswith('_generated.h') or f.endswith('_generated.go') or f.endswith('_generated.bin'))
|
|
||||||
):
|
|
||||||
os.unlink(os.path.join(root, f))
|
os.unlink(os.path.join(root, f))
|
||||||
for x in glob.glob('glfw/wayland-*-protocol.[ch]'):
|
for x in glob.glob('glfw/wayland-*-protocol.[ch]'):
|
||||||
os.unlink(x)
|
os.unlink(x)
|
||||||
|
|
|
||||||
3
tools/simdstring/.gitignore
vendored
3
tools/simdstring/.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
tags
|
|
||||||
simdstring.test
|
|
||||||
asm_*
|
|
||||||
|
|
@ -1379,11 +1379,11 @@ func do_one(s *State) {
|
||||||
s.Generate()
|
s.Generate()
|
||||||
|
|
||||||
if s.ISA.HasSIMD {
|
if s.ISA.HasSIMD {
|
||||||
write_file(fmt.Sprintf("asm_%d_%s.s", s.ISA.Bits, s.ISA.Goarch), s.ASMOutput.String())
|
write_file(fmt.Sprintf("asm_%d_%s_generated.s", s.ISA.Bits, s.ISA.Goarch), s.ASMOutput.String())
|
||||||
write_file(fmt.Sprintf("asm_%d_%s_test.s", s.ISA.Bits, s.ISA.Goarch), s.TestASMOutput.String())
|
write_file(fmt.Sprintf("asm_%d_%s_generated_test.s", s.ISA.Bits, s.ISA.Goarch), s.TestASMOutput.String())
|
||||||
}
|
}
|
||||||
write_file(fmt.Sprintf("asm_%d_%s.go", s.ISA.Bits, s.ISA.Goarch), s.StubOutput.String())
|
write_file(fmt.Sprintf("asm_%d_%s_generated.go", s.ISA.Bits, s.ISA.Goarch), s.StubOutput.String())
|
||||||
write_file(fmt.Sprintf("asm_%d_%s_test.go", s.ISA.Bits, s.ISA.Goarch), s.TestStubOutput.String())
|
write_file(fmt.Sprintf("asm_%d_%s_generated_test.go", s.ISA.Bits, s.ISA.Goarch), s.TestStubOutput.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
func create_isa(arch Arch, bits int) ISA {
|
func create_isa(arch Arch, bits int) ISA {
|
||||||
|
|
@ -1430,8 +1430,8 @@ func main() {
|
||||||
s.ISA.HasSIMD = false
|
s.ISA.HasSIMD = false
|
||||||
fmt.Fprintf(&s.StubOutput, "const HasSIMD%dCode = false\n", bits)
|
fmt.Fprintf(&s.StubOutput, "const HasSIMD%dCode = false\n", bits)
|
||||||
s.Generate()
|
s.Generate()
|
||||||
write_file(fmt.Sprintf("asm_other_%d.go", bits), s.StubOutput.String())
|
write_file(fmt.Sprintf("asm_other_%d_generated.go", bits), s.StubOutput.String())
|
||||||
write_file(fmt.Sprintf("asm_other_%d_test.go", bits), s.TestStubOutput.String())
|
write_file(fmt.Sprintf("asm_other_%d_generated_test.go", bits), s.TestStubOutput.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue