From 61c8ab03ab04dc4ca89f611d59d96f2e151f5a34 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Wed, 16 Jul 2025 22:55:22 +0800 Subject: [PATCH] runcpu: support static openmp --- src/bin/runcpu.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bin/runcpu.ts b/src/bin/runcpu.ts index 5130be7..1462250 100644 --- a/src/bin/runcpu.ts +++ b/src/bin/runcpu.ts @@ -141,18 +141,16 @@ const specProc = await spawnSPECWithID( `-L${path.resolve(prefix, 'lib')}`, ...optimizeFlags, "-fuse-ld=lld", + '-static', ...["--sysroot", sysroot], ...["base", "openmp"].includes(argv.optimizeProfile) ? [ ...argv.simd ? ["-Wl,-plugin-opt,-mattr=+simd"] : [], ...argv.allowMisaligned ? [`-Wl,-plugin-opt,${sw64UnalignedFlag}`] : [], ...sunwayGeneration === "8a" ? ["-Wl,-plugin-opt,-mattr=+core4"] : [], ] : [], - ...argv.optimizeProfile === "openmp" ? [ - `-Wl,-rpath=${argv.compilerPrefix}/lib`, - ] : ['-static'], ], compilerPaths: toolchain(argv.compilerPrefix, argv.compilerSuite as ToolchainSuite), - libs: (argv.compilerSuite === "llvm" || argv.compilerSuite !== "openmp") ? cflangLibs(prefix) : [], + libs: argv.compilerSuite === "llvm" ? cflangLibs(prefix) : [], specialFlags: getSpecialFlags(), openmp: { threads: (argv.optimizeProfile === "openmp" ? 64 : 1),