From 7dcc4d5ad60bdd853b9a3edc017a8c41f11330a1 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Tue, 12 Aug 2025 21:09:24 +0800 Subject: [PATCH] spec: link ompstub if the optimization profile is not "openmp" --- src/spec/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/spec/index.ts b/src/spec/index.ts index ccb9b9a..c8e022a 100644 --- a/src/spec/index.ts +++ b/src/spec/index.ts @@ -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,