cmd: invoke package tools with exact arguments
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
// ww version → print version
|
||||
//
|
||||
// Tool paths default to siblings of $0 so a fresh build runs out of
|
||||
// out/bin/. Env-var overrides (WW_W6C / WW_W6A / WW_W6L / WW_LIB) are
|
||||
// not yet supported in this port; the bootstrap doesn't need them.
|
||||
// out/bin/. WW_W6C / WW_W6A / WW_W6L select exact executable paths.
|
||||
// Source-library and runtime-library overrides are not yet supported.
|
||||
|
||||
package main;
|
||||
|
||||
@@ -162,6 +162,16 @@ fn owncstr(s: str) *u8 = {
|
||||
return b.ptr;
|
||||
};
|
||||
|
||||
fn toolpath(selfdir: *u8, envvar: str, name: str) *u8 = {
|
||||
match (os.getenv(envvar)) {
|
||||
case let p: str => {
|
||||
if (p.len != 0) { return owncstr(p); };
|
||||
};
|
||||
case void => void;
|
||||
};
|
||||
return joinpathlit(selfdir, name);
|
||||
};
|
||||
|
||||
// execpackagetests — replace the driver with the native WW package
|
||||
// coordinator for directory/default invocations. Explicit generated
|
||||
// package.ww roots stay on runsingletest, which is the recursion boundary when
|
||||
@@ -2018,9 +2028,9 @@ fn buildonesepimpl(selfdir: *u8, src: *u8, entryisdir: i32,
|
||||
};
|
||||
statusi += 1;
|
||||
};
|
||||
let c6: *u8 = joinpathlit(selfdir, "w6c_ww");
|
||||
let a6: *u8 = joinpathlit(selfdir, "w6a_ww");
|
||||
let l6: *u8 = joinpathlit(selfdir, "w6l_ww");
|
||||
let c6: *u8 = toolpath(selfdir, "WW_W6C", "w6c_ww");
|
||||
let a6: *u8 = toolpath(selfdir, "WW_W6A", "w6a_ww");
|
||||
let l6: *u8 = toolpath(selfdir, "WW_W6L", "w6l_ww");
|
||||
|
||||
let dotdotlib: []u8 = alloc([], (os.PATH_MAX: u64))!;
|
||||
dotdotlib.len = os.PATH_MAX;
|
||||
|
||||
Reference in New Issue
Block a user