mix-objects: inline linkenv

This commit is contained in:
2024-06-19 21:20:22 +08:00
parent a1450b36df
commit 10096bd147

View File

@@ -27,13 +27,6 @@ function mkPop2Bench(spec: SPEC): Bench & Linkable {
async link(objectPath) {
// Set up environment variables.
// FIXME: use -rpath or -rpath-link after I find out why.
const linkenv = { ...process.env };
linkenv.LD_LIBRARY_PATH = [
path.join(PREFIX, 'lib'),
path.join(SYSROOT_PREFIX, 'lib'),
path.join(SYSROOT_PREFIX, 'usr', 'lib')
].join(':');
const objects = objectPath(base.benchData().objectNames);
const options = [
@@ -51,7 +44,14 @@ function mkPop2Bench(spec: SPEC): Bench & Linkable {
// Execute the link command
const proc = checkedSpawnSync(FLANG, options, {
stdio: "inherit",
env: linkenv,
env: {
...process.env,
LD_LIBRARY_PATH: [
path.join(PREFIX, 'lib'),
path.join(SYSROOT_PREFIX, 'lib'),
path.join(SYSROOT_PREFIX, 'usr', 'lib')
].join(':')
},
});
if (proc.error) {