Respect value of LD_PRELOAD given by the CLI
This commit is contained in:
parent
2803f4a792
commit
9b506fed7c
3 changed files with 28 additions and 28 deletions
18
lib/tracer-config.js
generated
18
lib/tracer-config.js
generated
|
|
@ -182,15 +182,15 @@ async function getCombinedTracerConfig(config, codeql) {
|
||||||
tracedLanguageConfigs[language] = await getTracerConfigForLanguage(codeql, config, language);
|
tracedLanguageConfigs[language] = await getTracerConfigForLanguage(codeql, config, language);
|
||||||
}
|
}
|
||||||
mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config);
|
mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config);
|
||||||
}
|
// Add a couple more variables
|
||||||
// Add a couple more variables
|
mainTracerConfig.env["ODASA_TRACER_CONFIGURATION"] = mainTracerConfig.spec;
|
||||||
mainTracerConfig.env["ODASA_TRACER_CONFIGURATION"] = mainTracerConfig.spec;
|
const codeQLDir = path.dirname(codeql.getPath());
|
||||||
const codeQLDir = path.dirname(codeql.getPath());
|
if (process.platform === "darwin") {
|
||||||
if (process.platform === "darwin") {
|
mainTracerConfig.env["DYLD_INSERT_LIBRARIES"] = path.join(codeQLDir, "tools", "osx64", "libtrace.dylib");
|
||||||
mainTracerConfig.env["DYLD_INSERT_LIBRARIES"] = path.join(codeQLDir, "tools", "osx64", "libtrace.dylib");
|
}
|
||||||
}
|
else if (process.platform !== "win32") {
|
||||||
else if (process.platform !== "win32") {
|
mainTracerConfig.env["LD_PRELOAD"] = path.join(codeQLDir, "tools", "linux64", "${LIB}trace.so");
|
||||||
mainTracerConfig.env["LD_PRELOAD"] = path.join(codeQLDir, "tools", "linux64", "${LIB}trace.so");
|
}
|
||||||
}
|
}
|
||||||
// On macos it's necessary to prefix the build command with the runner executable
|
// On macos it's necessary to prefix the build command with the runner executable
|
||||||
// on order to trace when System Integrity Protection is enabled.
|
// on order to trace when System Integrity Protection is enabled.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -212,25 +212,25 @@ export async function getCombinedTracerConfig(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config);
|
mainTracerConfig = concatTracerConfigs(tracedLanguageConfigs, config);
|
||||||
}
|
|
||||||
|
|
||||||
// Add a couple more variables
|
// Add a couple more variables
|
||||||
mainTracerConfig.env["ODASA_TRACER_CONFIGURATION"] = mainTracerConfig.spec;
|
mainTracerConfig.env["ODASA_TRACER_CONFIGURATION"] = mainTracerConfig.spec;
|
||||||
const codeQLDir = path.dirname(codeql.getPath());
|
const codeQLDir = path.dirname(codeql.getPath());
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
mainTracerConfig.env["DYLD_INSERT_LIBRARIES"] = path.join(
|
mainTracerConfig.env["DYLD_INSERT_LIBRARIES"] = path.join(
|
||||||
codeQLDir,
|
codeQLDir,
|
||||||
"tools",
|
"tools",
|
||||||
"osx64",
|
"osx64",
|
||||||
"libtrace.dylib"
|
"libtrace.dylib"
|
||||||
);
|
);
|
||||||
} else if (process.platform !== "win32") {
|
} else if (process.platform !== "win32") {
|
||||||
mainTracerConfig.env["LD_PRELOAD"] = path.join(
|
mainTracerConfig.env["LD_PRELOAD"] = path.join(
|
||||||
codeQLDir,
|
codeQLDir,
|
||||||
"tools",
|
"tools",
|
||||||
"linux64",
|
"linux64",
|
||||||
"${LIB}trace.so"
|
"${LIB}trace.so"
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// On macos it's necessary to prefix the build command with the runner executable
|
// On macos it's necessary to prefix the build command with the runner executable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue