Enable share-generics in release bundle builds (#63432)
Cargo joins `build.rustflags` across config sources, so the base `symbol-mangling-version=v0` and `tokio_unstable` flags still apply after the newly added config. With sccache disabled, `cargo build --release -p zed` on macOS: Before: zed binary 420677880 bytes After: zed binary 375109048 bytes (-10.8%, -45.6MB) After `strip -x` of both (https://github.com/zed-industries/zed/pull/63429): 313879024 -> 307727432 bytes (-2.0%, -6.2MB) The rest of the delta is the smaller symbol table. `drop_glue` instantiations: 101778 -> 65041. Release Notes: - N/A
This commit is contained in:
1 parent
6dc2206180
commit
c032dcc3bc
4 files changed
+14
-9
No files matched your search
+2
-2
@@ -83,7 +83,7 @@ if [[ "$(uname -m)" == "aarch64" ]]; then
|
||||
else
|
||||
export RUSTFLAGS="${RUSTFLAGS:-} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
|
||||
fi
|
||||
cargo build --release --target "${target_triple}" --package zed --package cli
|
||||
cargo --config .cargo/bundle-config.toml build --release --target "${target_triple}" --package zed --package cli
|
||||
# Build remote_server in separate invocation to prevent feature unification from other crates
|
||||
# from influencing dynamic libraries required by it.
|
||||
if [[ "$remote_server_triple" == "$musl_triple" ]]; then
|
||||
@@ -91,7 +91,7 @@ if [[ "$remote_server_triple" == "$musl_triple" ]]; then
|
||||
musl_cc_var="CC_$(echo "$remote_server_triple" | tr '-' '_')"
|
||||
export "$musl_cc_var"=musl-gcc
|
||||
fi
|
||||
cargo build --release --target "${remote_server_triple}" --package remote_server
|
||||
cargo --config .cargo/bundle-config.toml build --release --target "${remote_server_triple}" --package remote_server
|
||||
|
||||
# Upload debug info to sentry.io
|
||||
if ! command -v sentry-cli >/dev/null 2>&1; then
|
||||
|
||||
Reference in new issue
Block a user