From 8976fba9d09d81fc059cc2cac6647df493a19fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 11 Jul 2026 03:32:36 -0400 Subject: [PATCH] fix: remap native release build paths --- agents.md | 2 ++ scripts/release_build_env.sh | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/agents.md b/agents.md index 7af410e..fcb9a4c 100644 --- a/agents.md +++ b/agents.md @@ -161,5 +161,7 @@ the trigger to ungate clipboard/geolocation/notification/webrtc prefs. `runtime.rs`/`runtime_paint.rs` or `state/local_visibility.rs`. - GPUI color encoding is explicit: pass 24-bit `RRGGBB` tokens to `rgb()` and 32-bit `RRGGBBAA` tokens to `rgba()`. +- Release builds remap workspace, Cargo, Rustup, sysroot, and target paths in + both Rust and native C/C++ objects; `verify_release_artifacts.sh` enforces it. - Tracing targets: `ely::sync`, `ely::local_state` — add spans/fields on every new failure path so field issues are diagnosable. diff --git a/scripts/release_build_env.sh b/scripts/release_build_env.sh index 47d02f1..7a73d76 100755 --- a/scripts/release_build_env.sh +++ b/scripts/release_build_env.sh @@ -11,6 +11,13 @@ ely_append_encoded_rustflag() { export CARGO_ENCODED_RUSTFLAGS } +ely_append_c_family_flag() { + local flag="$1" + CFLAGS="${CFLAGS:+${CFLAGS} }${flag}" + CXXFLAGS="${CXXFLAGS:+${CXXFLAGS} }${flag}" + export CFLAGS CXXFLAGS +} + ely_path_variants() { local path="$1" local canonical_path="" @@ -34,6 +41,14 @@ ely_add_release_path_remap() { while IFS= read -r variant; do [[ -n "${variant}" ]] || continue ely_append_encoded_rustflag "--remap-path-prefix=${variant}=${replacement}" + case "$(uname -s)" in + MINGW*|MSYS*|CYGWIN*) + ely_append_c_family_flag "/pathmap:${variant}=${replacement}" + ;; + *) + ely_append_c_family_flag "-ffile-prefix-map=${variant}=${replacement}" + ;; + esac done < <(ely_path_variants "${path}") }