diff --git a/lang/src/compiler/entry/compiler_stageb.hako b/lang/src/compiler/entry/compiler_stageb.hako index f54796dd..5106018b 100644 --- a/lang/src/compiler/entry/compiler_stageb.hako +++ b/lang/src/compiler/entry/compiler_stageb.hako @@ -65,8 +65,11 @@ static box StageBArgsBox { local inline = env.get("HAKO_SOURCE_FILE_CONTENT") if inline != null { src = "" + inline } } - // Skip env.local.get check - Stage-3 keyword conflict - // Original: if src == null { src = env.local.get("HAKO_SOURCE") } + // Phase 73: Fallback to HAKO_SRC env variable (unified I/O path) + // This eliminates the need for large argv strings (solves "Argument list too long") + if src == null { + src = env.get("HAKO_SRC") + } if src == null { src = "return 0" } { diff --git a/tools/selfhost/selfhost_build.sh b/tools/selfhost/selfhost_build.sh index a4782b7a..0ab3e359 100644 --- a/tools/selfhost/selfhost_build.sh +++ b/tools/selfhost/selfhost_build.sh @@ -93,10 +93,11 @@ else apply_selfhost_env stageb_cmd_desc="compiler.hako --stage-b --stage3" ( + export HAKO_SRC="$SRC_CONTENT" cd "$ROOT" && \ "$BIN" --backend vm \ "$ROOT/lang/src/compiler/entry/compiler.hako" -- \ - --stage-b --stage3 --source "$SRC_CONTENT" + --stage-b --stage3 ) > "$RAW" 2>&1 || stageb_rc=$? fi