add Singeli directory to build cache key, add rebuild-singeli, quiet gcc
This commit is contained in:
parent
0312c05851
commit
b506b434a2
@ -19,6 +19,7 @@ opts ← ⟨
|
|||||||
⟨1, "verbose", 0, "Log more things"⟩
|
⟨1, "verbose", 0, "Log more things"⟩
|
||||||
⟨1, "rebuild", 0, "Forcibly rebuild everything"⟩
|
⟨1, "rebuild", 0, "Forcibly rebuild everything"⟩
|
||||||
⟨1, "notui", 0, "disable live-updating status display"∾@+10⟩
|
⟨1, "notui", 0, "disable live-updating status display"∾@+10⟩
|
||||||
|
⟨1, "rebuild-singeli", 0, @⟩
|
||||||
|
|
||||||
⟨0, "CC", @, "The used C compiler"⟩
|
⟨0, "CC", @, "The used C compiler"⟩
|
||||||
⟨0, "LD", @, "Linker of the final binary; defaults to CC, or CXX if REPLXX=1"⟩
|
⟨0, "LD", @, "Linker of the final binary; defaults to CC, or CXX if REPLXX=1"⟩
|
||||||
@ -37,7 +38,7 @@ opts ← ⟨
|
|||||||
⟨2, "rm_lf", ⟨⟩, "forcibly remove linker flag(s)"⟩
|
⟨2, "rm_lf", ⟨⟩, "forcibly remove linker flag(s)"⟩
|
||||||
⟨0, "v", @, "Version to report by --version; 'v=' to use git commit"∾@+10⟩
|
⟨0, "v", @, "Version to report by --version; 'v=' to use git commit"∾@+10⟩
|
||||||
|
|
||||||
⟨1, "shared", 0, "Build a shared library; default output is libcbqn.[so|dylib]"⟩
|
⟨1, "shared", 0, "Build a shared library; default output depends on 'os' setting"⟩
|
||||||
⟨1, "wasi", 0, "Build with WASI; default output name is BQN.wasm"⟩
|
⟨1, "wasi", 0, "Build with WASI; default output name is BQN.wasm"⟩
|
||||||
⟨1, "emcc", 0, "Build with emscripten; outputs two files - BQN.wasm and BQN.js"⟩
|
⟨1, "emcc", 0, "Build with emscripten; outputs two files - BQN.wasm and BQN.js"⟩
|
||||||
⟨1, "clangd", 0, "Don't build, instead generate a compile_commands.json for clangd"∾@+10⟩
|
⟨1, "clangd", 0, "Don't build, instead generate a compile_commands.json for clangd"∾@+10⟩
|
||||||
@ -133,7 +134,7 @@ AtRoot ← rootDir⊸•file.At
|
|||||||
|
|
||||||
po ← { # parsed options
|
po ← { # parsed options
|
||||||
⟨
|
⟨
|
||||||
verbose, J, rebuildAll, tui, output, clangd, versionName,
|
verbose, J, rebuildAll, rebuildSingeli, tui, output, clangd, versionName,
|
||||||
os, arch, native,
|
os, arch, native,
|
||||||
emcc, wasm, replxx, singeli,
|
emcc, wasm, replxx, singeli,
|
||||||
ffi, o3,
|
ffi, o3,
|
||||||
@ -146,6 +147,7 @@ po ← { # parsed options
|
|||||||
DOpt ← {@⊸≡◶⟨⊢,𝕨⟩ GetOpt 𝕩}
|
DOpt ← {@⊸≡◶⟨⊢,𝕨⟩ GetOpt 𝕩}
|
||||||
J ⇐ {𝕊: v←GetOpt "j" ⋄ v≢@? •BQN v; •BQN⎊4 "4" TrySH ⟨"nproc"⟩}
|
J ⇐ {𝕊: v←GetOpt "j" ⋄ v≢@? •BQN v; •BQN⎊4 "4" TrySH ⟨"nproc"⟩}
|
||||||
rebuildAll ⇐ GetOpt "rebuild"
|
rebuildAll ⇐ GetOpt "rebuild"
|
||||||
|
rebuildSingeli ⇐ GetOpt "rebuild-singeli"
|
||||||
tui ⇐ ¬GetOpt "notui"
|
tui ⇐ ¬GetOpt "notui"
|
||||||
{𝕊: _verboseLog ↩ {Log𝕨𝔽𝕩⋄𝕩}}⍟⊢ verbose⇐GetOpt "verbose"
|
{𝕊: _verboseLog ↩ {Log𝕨𝔽𝕩⋄𝕩}}⍟⊢ verbose⇐GetOpt "verbose"
|
||||||
|
|
||||||
@ -378,11 +380,11 @@ Run ← { 𝕊:
|
|||||||
req ← ⟨⟩
|
req ← ⟨⟩
|
||||||
ruleN ← 0¨ ruleKs # number of children (i.e. how many have this in their ruleP list)
|
ruleN ← 0¨ ruleKs # number of children (i.e. how many have this in their ruleP list)
|
||||||
ruleP ← ⟨⟩¨ ruleKs # parent rules (i.e. which ones require this)
|
ruleP ← ⟨⟩¨ ruleKs # parent rules (i.e. which ones require this)
|
||||||
rebuildAll ← po.rebuildAll
|
|
||||||
|
|
||||||
Require ← {
|
Require ← {
|
||||||
v ← 𝕩⊑ruleVs
|
v ← 𝕩⊑ruleVs
|
||||||
rebuild ← rebuildAll
|
rebuild ← po.rebuildAll
|
||||||
|
{𝕊: rebuild∨↩ ".singeli"≡¯8↑v.disp}⍟⊢ po.rebuildSingeli
|
||||||
chi ← 𝕩⊑ruleSrcs
|
chi ← 𝕩⊑ruleSrcs
|
||||||
chr ← Require¨ chi
|
chr ← Require¨ chi
|
||||||
rebuild∨↩ ∨´ chr
|
rebuild∨↩ ∨´ chr
|
||||||
@ -578,7 +580,7 @@ cachedBin‿linkerCache ← {
|
|||||||
singeliObjs ← @
|
singeliObjs ← @
|
||||||
singeliCache ← {
|
singeliCache ← {
|
||||||
¬po.singeli? @;
|
¬po.singeli? @;
|
||||||
singeliCache ← GetCache ⟨"singeli", "Singeli generated code location", ⟨po.native, po.arch, po.singeliFlags⟩⟩
|
singeliCache ← GetCache ⟨"singeli", "Singeli generated code location", ⟨po.native, po.arch, po.singeliFlags, po.singeliDir⟩⟩
|
||||||
|
|
||||||
# genArithTables
|
# genArithTables
|
||||||
ga ← "src/singeli/src/genArithTables.bqn"
|
ga ← "src/singeli/src/genArithTables.bqn"
|
||||||
|
|||||||
@ -212,7 +212,7 @@ B find_c2(B t, B w, B x) {
|
|||||||
ur wr = isAtm(w) ? 0 : RNK(w);
|
ur wr = isAtm(w) ? 0 : RNK(w);
|
||||||
ur xr = isAtm(x) ? 0 : RNK(x);
|
ur xr = isAtm(x) ? 0 : RNK(x);
|
||||||
if (wr > xr) thrF("⍷: Rank of 𝕨 must be at most rank of 𝕩 (%i≡=𝕨, %i≡=𝕩)", wr, xr);
|
if (wr > xr) thrF("⍷: Rank of 𝕨 must be at most rank of 𝕩 (%i≡=𝕨, %i≡=𝕩)", wr, xr);
|
||||||
u8 xe, we;
|
u8 xe, we ONLY_GCC(= 0);
|
||||||
if (xr==1 && (xe=TI(x,elType))!=el_B && xe!=el_bit && (isAtm(w) || (we=TI(w,elType))!=el_B)) {
|
if (xr==1 && (xe=TI(x,elType))!=el_B && xe!=el_bit && (isAtm(w) || (we=TI(w,elType))!=el_B)) {
|
||||||
if (wr == 0) return C2(eq, w, x);
|
if (wr == 0) return C2(eq, w, x);
|
||||||
usz wl = IA(w);
|
usz wl = IA(w);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user