From b29cf1ad116d3a5166ef147ce1e9f3405600cf91 Mon Sep 17 00:00:00 2001 From: yilsem Date: Sun, 11 Oct 2026 17:43:38 +0300 Subject: [PATCH] fix(desktop): request Windows libc variant for cross packaging --- apps/desktop/scripts/stage-native-deps.mjs | 2 +- apps/desktop/scripts/stage-native-deps.test.mjs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/desktop/scripts/stage-native-deps.mjs b/apps/desktop/scripts/stage-native-deps.mjs index fb7daa1..d7cfe7c 100644 --- a/apps/desktop/scripts/stage-native-deps.mjs +++ b/apps/desktop/scripts/stage-native-deps.mjs @@ -564,7 +564,7 @@ export function installGetWindowsNativeBinding( const crossTarget = platform !== process.platform || arch !== process.arch const installerArgs = crossTarget - ? ['install', `--target_platform=${platform}`, `--target_arch=${arch}`, '--fallback-to-build=false'] + ? ['install', `--target_platform=${platform}`, `--target_arch=${arch}`, ...(platform === 'win32' ? ['--target_libc=unknown'] : []), '--fallback-to-build=false'] : ['install', '--fallback-to-build'] const result = spawn(process.execPath, [installerPath, ...installerArgs], { cwd: srcRoot, diff --git a/apps/desktop/scripts/stage-native-deps.test.mjs b/apps/desktop/scripts/stage-native-deps.test.mjs index 96e44da..3705b40 100644 --- a/apps/desktop/scripts/stage-native-deps.test.mjs +++ b/apps/desktop/scripts/stage-native-deps.test.mjs @@ -647,5 +647,6 @@ test('get-windows cross-target install requests the target prebuild without comp spawn: (command, args) => { calls.push(args); return { status: 0 } } }) assert.deepEqual(calls[0], ['/fake/node-pre-gyp', 'install', - `--target_platform=${platform}`, '--target_arch=x64', '--fallback-to-build=false']) + `--target_platform=${platform}`, '--target_arch=x64', + ...(platform === 'win32' ? ['--target_libc=unknown'] : []), '--fallback-to-build=false']) })