spec: link ompstub if the optimization profile is not "openmp"

This commit is contained in:
2025-08-12 21:09:24 +08:00
parent 60619281e4
commit 7dcc4d5ad6

View File

@@ -333,6 +333,12 @@ export async function runSPEC({
return "";
}
let libs = compilerSuite === "llvm" ? cflangLibs(prefix) : [];
if (optimizeProfile !== "openmp") {
libs.push("-lompstub");
}
// Spawn SPEC process with configuration
const specProc = await spawnSPECWithID(
specInstance,
@@ -360,7 +366,7 @@ export async function runSPEC({
),
],
compilerPaths: toolchain(compilerPrefix, compilerSuite as ToolchainSuite),
libs: compilerSuite === "llvm" ? cflangLibs(prefix) : [],
libs,
specialFlags: getSpecialFlags(),
openmp: {
threads: optimizeProfile === "openmp" ? 64 : 1,