ww: select build action from package declaration

This commit is contained in:
2026-08-13 13:36:10 +09:00
parent 61a2ee5221
commit dab3cb4998
61 changed files with 872 additions and 157 deletions

View File

@@ -15,7 +15,7 @@ package direnum_test;
// Both stages must FAIL with "conflicting package names", and the
// two stages' diagnostics must be byte-identical.
//
// rootorder — a private rootok/ dir built DIRECTLY (z.ww ORDER-Z
// rootorder — a private rootok/ command dir built DIRECTLY (z.ww ORDER-Z
// value()=17 vs a.ww ORDER-A leading comment + main): build exit 0,
// the binary exits 17, and the driver's local-identity owner unit
// stores ORDER-A strictly before ORDER-Z (byte-sorted deterministic
@@ -121,14 +121,14 @@ fn rejectpair(label: str, td: str, target: str, needle: str) void = {
let rootok: str = strings.concat(td, "/rootok");
assert(os.mkdir(rootok, 493) == 0);
testenv.writefile(strings.concat(rootok, "/z.ww"), strings.concat(
"package rootok;\n// ORDER-Z\n",
"package main;\n// ORDER-Z\n",
"fn value() i32 = { return 17; };\n"));
testenv.writefile(strings.concat(rootok, "/a.ww"), strings.concat(
"// leading comment is part of the loader grammar\n",
"package rootok;\n// ORDER-A\n",
"package main;\n// ORDER-A\n",
"fn main() i32 = { return value(); };\n"));
let drvs: []str = ["ww", "ww_ww"];
let identity: str = testenv.localpackageidentity(rootok, "rootok");
let identity: str = testenv.localpackageidentity(rootok, "main");
let units: []str = ["", ""];
let s: i32 = 0;
for (s < 2) {