Build Singeli files with a filename prefix
This commit is contained in:
parent
cad566d547
commit
47cdf02877
@ -9,9 +9,10 @@ srcfile ← •file.At srcfileR
|
|||||||
resfile ← •file.At resfileR
|
resfile ← •file.At resfileR
|
||||||
tmpfile ← (•file.At buildDir) •file.At filename∾".d.orig"
|
tmpfile ← (•file.At buildDir) •file.At filename∾".d.orig"
|
||||||
depfile ← (•file.At buildDir) •file.At filename∾".d"
|
depfile ← (•file.At buildDir) •file.At filename∾".d"
|
||||||
|
prefix ← "si_"∾ (∧`'.'⊸≠)⊸/ •file.Name srcfile
|
||||||
|
|
||||||
# invoke singeli, which creates the result file
|
# invoke singeli, which creates the result file
|
||||||
(⟨"-d" ⋄ tmpfile ⋄ "-o" ⋄ resfile ⋄ srcfile⟩) •Import siDir •file.At "singeli"
|
(⟨"-d" ⋄ tmpfile ⋄ "-o" ⋄ resfile ⋄ "-n" ⋄ prefix ⋄ srcfile⟩) •Import siDir •file.At "singeli"
|
||||||
|
|
||||||
# output dependency file
|
# output dependency file
|
||||||
deps ← siDir⊸•file.At¨ •file.Lines tmpfile
|
deps ← siDir⊸•file.At¨ •file.Lines tmpfile
|
||||||
|
|||||||
@ -19,7 +19,7 @@ def bit {k,x} = x & (1<<k) # get the k-th bit
|
|||||||
def rare{x:u1} = emit{u1, '__builtin_expect', x, 0}
|
def rare{x:u1} = emit{u1, '__builtin_expect', x, 0}
|
||||||
def assert{x & x==0} = assert{'failed assertion'}
|
def assert{x & x==0} = assert{'failed assertion'}
|
||||||
def assert{x & x==1} = 1
|
def assert{x & x==1} = 1
|
||||||
def assert{x:u1} = emit{void, 'si_assert', x}
|
def assert{x:u1} = { if (not x) emit{void, '__builtin_unreachable'} }
|
||||||
|
|
||||||
|
|
||||||
# various checks
|
# various checks
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user