diff --git a/scripts/dev.mjs b/scripts/dev.mjs index ebedfea92..bca97def5 100644 --- a/scripts/dev.mjs +++ b/scripts/dev.mjs @@ -148,7 +148,7 @@ function applyLocalFfmpegEnv(env, platform = process.platform) { const localSccacheProbeCache = new Map(); -function resolveLocalDevRustcWrapperBypass(options = {}) { +function resolveLocalDevRustcWrapperBypass(configuredWrapper, options = {}) { if (process.platform !== 'win32') { return '/usr/bin/env'; } @@ -156,13 +156,13 @@ function resolveLocalDevRustcWrapperBypass(options = {}) { const sccacheAvailable = options.sccacheAvailable ?? (() => { - const cacheKey = `${process.platform}:sccache`; + const cacheKey = `${process.platform}:${configuredWrapper}`; const cached = localSccacheProbeCache.get(cacheKey); if (cached !== undefined) { return cached; } - const result = spawnSync('sccache', ['rustc', '-vV'], { + const result = spawnSync(configuredWrapper, ['rustc', '-vV'], { cwd: repoRoot, encoding: 'utf8', shell: true, @@ -628,7 +628,7 @@ function buildLocalRustProcessEnv(env, options = {}) { } const rustcWrapper = configuredWrapper - ? resolveLocalDevRustcWrapperBypass(options) + ? resolveLocalDevRustcWrapperBypass(configuredWrapper, options) : ''; mergedEnv.RUSTC_WRAPPER = rustcWrapper; mergedEnv.CARGO_BUILD_RUSTC_WRAPPER = rustcWrapper;