update submodule before singeli/arch.bqn invocation

This commit is contained in:
dzaima 2023-12-04 16:38:44 +02:00
parent e30973e48b
commit 304899f533

View File

@ -152,12 +152,28 @@ SH ← { # if 𝕨≢@, returns 𝕨 if failed to spawn
}
TrySH {1•SH1𝕨"" 𝕩}
nogit1
GitCmd {
𝕨 {"Error: git needed for "𝕨", but nogit=1 specified"}_assert_¬ nogit
¯1SH "git", "-C", rootDir𝕩
}
updateSubmodule {
done
{
𝕩@? @;
"Local"¯5𝕩? @;
𝕩<done? @;
done <𝕩
("updating "𝕩) GitCmd "submodule", "update", "--init", AtRoot 𝕩
}
}
rootDir •file.Parent2 •file.path
AtRoot rootDir•file.At
po { # parsed options
verbose, J, rebuildAll, rebuildSingeli, tui, nogit, loud, output, clangd, versionName,
verbose, J, rebuildAll, rebuildSingeli, tui, loud, output, clangd, versionName,
os, arch, native, has, avx2,
emcc, wasm, replxx, singeli, staticLib,
usz, ffi, o3, debug, rtverify, heapverify,
@ -174,7 +190,7 @@ po ← { # parsed options
rebuildSingeli GetOpt "rebuild-singeli"
tui @¬{𝕊: f@•FFI"i32""isatty"">i32" F 1} GetOpt "notui"
loud ¬GetOpt "quiet"
nogit GetOpt "nogit"
nogit GetOpt "nogit"
{𝕊: _verboseLog {Log𝕨𝔽𝕩𝕩}} verboseGetOpt "verbose"
@ -329,6 +345,7 @@ po ← { # parsed options
args {
native? "-march=native";
: ;
UpdateSubmodule singeliDir
"Error: Cannot use has=... if Singeli isn't enabled"_assert_ singeli
(singeliArch, 1 •Import AtRoot singeliDir •file.At "arch.bqn").GetCFlags@
} has
@ -405,20 +422,6 @@ isFileTheSame ← {
𝕩 t
}
}
GitCmd {
𝕨 {"Error: git needed for "𝕨", but nogit=1 specified"}_assert_¬ po.nogit
¯1SH "git", "-C", rootDir𝕩
}
updateSubmodule {
done
{
𝕩@? @;
"Local"¯5𝕩? @;
𝕩<done? @;
done <𝕩
("updating "𝕩) GitCmd "submodule", "update", "--init", AtRoot 𝕩
}
}
# gets/creates a directory of cacheable objects; key is the unique identifier of when it can be reused
GetCache { 𝕊 basenamedesckey: