fix: remap native release build paths

This commit is contained in:
2026-07-11 03:32:36 -04:00
parent 5616744c04
commit 8976fba9d0
2 changed files with 17 additions and 0 deletions
+2
View File
@@ -161,5 +161,7 @@ the trigger to ungate clipboard/geolocation/notification/webrtc prefs.
`runtime.rs`/`runtime_paint.rs` or `state/local_visibility.rs`. `runtime.rs`/`runtime_paint.rs` or `state/local_visibility.rs`.
- GPUI color encoding is explicit: pass 24-bit `RRGGBB` tokens to `rgb()` and - GPUI color encoding is explicit: pass 24-bit `RRGGBB` tokens to `rgb()` and
32-bit `RRGGBBAA` tokens to `rgba()`. 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 - Tracing targets: `ely::sync`, `ely::local_state` — add spans/fields on
every new failure path so field issues are diagnosable. every new failure path so field issues are diagnosable.
+15
View File
@@ -11,6 +11,13 @@ ely_append_encoded_rustflag() {
export CARGO_ENCODED_RUSTFLAGS 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() { ely_path_variants() {
local path="$1" local path="$1"
local canonical_path="" local canonical_path=""
@@ -34,6 +41,14 @@ ely_add_release_path_remap() {
while IFS= read -r variant; do while IFS= read -r variant; do
[[ -n "${variant}" ]] || continue [[ -n "${variant}" ]] || continue
ely_append_encoded_rustflag "--remap-path-prefix=${variant}=${replacement}" 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}") done < <(ely_path_variants "${path}")
} }