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:
Kirill Bulatov authored and GitHub committed 2026-08-31 05:42:11 +00:00
1 parent 6dc2206180
commit c032dcc3bc
4 files changed
+14 -9

No files matched your search

+5 -5
View File
@@ -116,20 +116,20 @@ function GenerateLicenses {
function BuildZedAndItsFriends {
Write-Output "Building Zed and its friends, for channel: $channel"
# Build zed.exe, cli.exe and auto_update_helper.exe
cargo build --release --package zed --package cli --package auto_update_helper --target $target
cargo --config .cargo/bundle-config.toml build --release --package zed --package cli --package auto_update_helper --target $target
Copy-Item -Path ".\$CargoOutDir\zed.exe" -Destination "$innoDir\Zed.exe" -Force
Copy-Item -Path ".\$CargoOutDir\cli.exe" -Destination "$innoDir\cli.exe" -Force
Copy-Item -Path ".\$CargoOutDir\auto_update_helper.exe" -Destination "$innoDir\auto_update_helper.exe" -Force
# Build explorer_command_injector.dll
switch ($channel) {
"stable" {
cargo build --release --features stable --no-default-features --package explorer_command_injector --target $target
cargo --config .cargo/bundle-config.toml build --release --features stable --no-default-features --package explorer_command_injector --target $target
}
"preview" {
cargo build --release --features preview --no-default-features --package explorer_command_injector --target $target
cargo --config .cargo/bundle-config.toml build --release --features preview --no-default-features --package explorer_command_injector --target $target
}
default {
cargo build --release --package explorer_command_injector --target $target
cargo --config .cargo/bundle-config.toml build --release --package explorer_command_injector --target $target
}
}
Copy-Item -Path ".\$CargoOutDir\explorer_command_injector.dll" -Destination "$innoDir\zed_explorer_command_injector.dll" -Force
@@ -137,7 +137,7 @@ function BuildZedAndItsFriends {
function BuildRemoteServer {
Write-Output "Building remote_server for $target"
cargo build --release --package remote_server --target $target
cargo --config .cargo/bundle-config.toml build --release --package remote_server --target $target
# Create zipped remote server binary
$remoteServerSrc = (Resolve-Path ".\$CargoOutDir\remote_server.exe").Path