Singeli flags option
This commit is contained in:
parent
e4578a345e
commit
bc78b9e3a8
@ -31,6 +31,7 @@ opts ← ⟨
|
|||||||
⟨2, "f", ⟨⟩, "C flags for CBQN files"⟩
|
⟨2, "f", ⟨⟩, "C flags for CBQN files"⟩
|
||||||
⟨2, "CCFLAGS", ⟨⟩, "flags for all C compiler & linker invocations"⟩
|
⟨2, "CCFLAGS", ⟨⟩, "flags for all C compiler & linker invocations"⟩
|
||||||
⟨2, "lf", ⟨⟩, "linker flags"⟩
|
⟨2, "lf", ⟨⟩, "linker flags"⟩
|
||||||
|
⟨2, "sf", ⟨⟩, "Singeli flags"⟩
|
||||||
⟨2, "LDFLAGS", ⟨⟩, @⟩
|
⟨2, "LDFLAGS", ⟨⟩, @⟩
|
||||||
⟨2, "rm_f", ⟨⟩, "forcibly remove C compiler flag(s)"⟩
|
⟨2, "rm_f", ⟨⟩, "forcibly remove C compiler flag(s)"⟩
|
||||||
⟨2, "rm_lf", ⟨⟩, "forcibly remove linker flag(s)"⟩
|
⟨2, "rm_lf", ⟨⟩, "forcibly remove linker flag(s)"⟩
|
||||||
@ -136,7 +137,7 @@ po ← { # parsed options
|
|||||||
emcc, wasm, replxx, singeli,
|
emcc, wasm, replxx, singeli,
|
||||||
ffi, o3,
|
ffi, o3,
|
||||||
bytecodeDir, replxxDir, singeliDir,
|
bytecodeDir, replxxDir, singeliDir,
|
||||||
CBQNc, REPLXXc, Linker
|
CBQNc, REPLXXc, Linker, singeliFlags
|
||||||
⟩⇐
|
⟩⇐
|
||||||
|
|
||||||
custom ← GetOpt "c"
|
custom ← GetOpt "c"
|
||||||
@ -258,6 +259,8 @@ po ← { # parsed options
|
|||||||
replxxc ↩ args
|
replxxc ↩ args
|
||||||
}
|
}
|
||||||
|
|
||||||
|
singeliFlags ← GetOpt "sf"
|
||||||
|
|
||||||
Linker ⇐ { 𝕊:
|
Linker ⇐ { 𝕊:
|
||||||
args ← ⟨{replxx? cxx; cc} DOpt "LD", "-lm"⟩
|
args ← ⟨{replxx? cxx; cc} DOpt "LD", "-lm"⟩
|
||||||
args∾↩ 1⊑GetLibs@
|
args∾↩ 1⊑GetLibs@
|
||||||
@ -534,7 +537,7 @@ cachedBin‿linkerCache ← {
|
|||||||
singeliObjs ← @
|
singeliObjs ← @
|
||||||
singeliCache ← {
|
singeliCache ← {
|
||||||
¬po.singeli? @;
|
¬po.singeli? @;
|
||||||
singeliCache ← GetCache ⟨"singeli", "Singeli generated code location", ⟨po.native, po.arch⟩⟩
|
singeliCache ← GetCache ⟨"singeli", "Singeli generated code location", ⟨po.native, po.arch, po.singeliFlags⟩⟩
|
||||||
|
|
||||||
# genArithTables
|
# genArithTables
|
||||||
ga ← "src/singeli/src/genArithTables.bqn"
|
ga ← "src/singeli/src/genArithTables.bqn"
|
||||||
@ -547,7 +550,7 @@ cachedBin‿linkerCache ← {
|
|||||||
•file.Name ga, ⟨⟩
|
•file.Name ga, ⟨⟩
|
||||||
⟩
|
⟩
|
||||||
|
|
||||||
singeliArgs ← ⟨"-l", "gen="∾singeliCache.folder⟩∾{
|
singeliArgs ← po.singeliFlags∾⟨"-l", "gen="∾singeliCache.folder⟩∾{
|
||||||
po.native? ⟨⟩;
|
po.native? ⟨⟩;
|
||||||
"-a" ⋈ {"x86-64":"X86_64"; "aarch64":"AARCH64"} po.arch
|
"-a" ⋈ {"x86-64":"X86_64"; "aarch64":"AARCH64"} po.arch
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user