修正 POSIX sccache 绕过日志

明确记录 Linux 和 macOS 本地开发实际绕过 sccache

补充 POSIX 日志回归测试并更新排障文档
This commit is contained in:
2026-09-14 06:29:28 +00:00
committed by 孔令弘
parent a3918c89f0
commit fed9960684
3 changed files with 38 additions and 6 deletions
+11 -5
View File
@@ -623,12 +623,18 @@ function buildLocalRustProcessEnv(env, options = {}) {
mergedEnv.RUSTC_WRAPPER = rustcWrapper;
mergedEnv.CARGO_BUILD_RUSTC_WRAPPER = rustcWrapper;
if (options.log !== false) {
const isPosixSccacheBypass =
configuredWrapper &&
isSccacheRustcWrapper(configuredWrapper) &&
process.platform !== 'win32';
console.warn(
rustcWrapper
? '[dev:rust] 本地 dev 构建启用 sccache wrapper。'
: configuredWrapper
? '[dev:rust] sccache wrapper 探测失败,回退到直接 rustc。'
: '[dev:rust] 未显式配置 Rust wrapper,使用直接 rustc。',
isPosixSccacheBypass
? '[dev:rust] POSIX 本地 dev 构建绕过 sccache,使用直接 rustc。'
: rustcWrapper
? '[dev:rust] 本地 dev 构建启用 sccache wrapper。'
: configuredWrapper
? '[dev:rust] sccache wrapper 探测失败,回退到直接 rustc。'
: '[dev:rust] 未显式配置 Rust wrapper,使用直接 rustc。',
);
}
return mergedEnv;