diff --git a/scripts/build/compile.ts b/scripts/build/compile.ts index 72c780fda9fb..4d5b5a9683cf 100644 --- a/scripts/build/compile.ts +++ b/scripts/build/compile.ts @@ -422,7 +422,7 @@ export interface LinkOpts { */ implicitInputs?: string[]; /** Output linker map to this path (for debugging symbol bloat). */ - linkerMapOutput?: string; + linkerMapOutput?: string | undefined; } /** diff --git a/scripts/build/deps/webkit.ts b/scripts/build/deps/webkit.ts index e1ef50a8a6b2..c3978fa71135 100644 --- a/scripts/build/deps/webkit.ts +++ b/scripts/build/deps/webkit.ts @@ -232,7 +232,10 @@ export const webkit: Dependency = { // PIC codegen here is pure overhead (GOT indirections + ~550 KB of // RW-segment vtables that would otherwise be shared RO). Android stays // PIC because bionic mandates PIE. - if (cfg.unix && cfg.abi !== "android") optFlags.push("-fno-pic", "-fno-pie"); + // -no-pie rides along in CMAKE_C_FLAGS so try_compile() probes link on + // PIE-default distros — without it the driver still passes -pie and the + // -fno-pic probe object fails R_X86_64_32S relocation, killing FindThreads. + if (cfg.unix && cfg.abi !== "android") optFlags.push("-fno-pic", "-fno-pie", "-no-pie"); if (cfg.lto) optFlags.push("-flto=full"); if (cfg.pgoGenerate) optFlags.push(`-fprofile-generate=${cfg.pgoGenerate}`); if (cfg.pgoUse) {