diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2024-01-25 08:49:55 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2024-01-25 08:49:55 +0100 |
| commit | 81be487a7d5ffb7ed96b4e5ba11aac44c4dd36f6 (patch) | |
| tree | 6f0e151e5783b978cda618ab5d9bcdad043c3920 | |
| parent | a27ec77670d0d8e15a82cd78f299f819edcfd3a1 (diff) | |
| parent | 321e5c8368cc7348687f691cf1122304346e83f0 (diff) | |
| download | mullvadvpn-81be487a7d5ffb7ed96b4e5ba11aac44c4dd36f6.tar.xz mullvadvpn-81be487a7d5ffb7ed96b4e5ba11aac44c4dd36f6.zip | |
Merge branch 'strip-binaries-with-cargo'
| -rw-r--r-- | Cargo.toml | 1 | ||||
| -rwxr-xr-x | build.sh | 16 |
2 files changed, 4 insertions, 13 deletions
diff --git a/Cargo.toml b/Cargo.toml index aa4983d122..d3ad0a462a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,6 +71,7 @@ once_cell = "1.13" [profile.release] opt-level = 3 lto = true +strip = true # Key generation may take over one minute without optimizations # enabled. @@ -200,17 +200,12 @@ function sign_win { } # Build the daemon and other Rust/C++ binaries, optionally -# sign them, strip them of debug symbols and copy to `dist-assets/`. +# sign them, and copy to `dist-assets/`. function build { local current_target=${1:-""} local for_target_string=" for local target $HOST" - local stripbin="strip" if [[ -n $current_target ]]; then for_target_string=" for $current_target" - - if [[ "$current_target" == "aarch64-unknown-linux-gnu" && "$(uname -m)" != "aarch64" ]]; then - stripbin="aarch64-linux-gnu-strip" - fi fi ################################################################################ @@ -287,13 +282,8 @@ function build { local source="$cargo_output_dir/$binary" local destination="$destination_dir/$binary" - if [[ "$(uname -s)" == "MINGW"* || "$binary" == *.dylib ]]; then - log_info "Copying $source => $destination" - cp "$source" "$destination" - else - log_info "Stripping $source => $destination" - "${stripbin}" "$source" -o "$destination" - fi + log_info "Copying $source => $destination" + cp "$source" "$destination" if [[ "$SIGN" == "true" && "$(uname -s)" == "MINGW"* ]]; then sign_win "$destination" |
