diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-02-08 00:24:02 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-03-05 23:31:57 +0100 |
| commit | fc22b7cab4ff695c49eedc8e103a3ec822e9b9e5 (patch) | |
| tree | 8569a831f3c746d00b303aafd55b6b936400bdb2 | |
| parent | e2d70cf29cd11273fbf15d50c494e5c38dc20b3c (diff) | |
| download | mullvadvpn-fc22b7cab4ff695c49eedc8e103a3ec822e9b9e5.tar.xz mullvadvpn-fc22b7cab4ff695c49eedc8e103a3ec822e9b9e5.zip | |
Add build script for installer-downloader
| -rw-r--r-- | installer-downloader/build.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/installer-downloader/build.sh b/installer-downloader/build.sh new file mode 100644 index 0000000000..eb9b87e91f --- /dev/null +++ b/installer-downloader/build.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# This script is used to build, and optionally sign the downloader, always in release mode. + +# This script performs the equivalent of the following profile: +# +# [profile.release] +# strip = true +# opt-level = 'z' +# codegen-units = 1 +# lto = true +# panic = 'abort' +# +# We cannot set all of the above directly in Cargo.toml since some must be set for the entire +# workspace. + +set -eu + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd "$SCRIPT_DIR" + +# shellcheck disable=SC1091 +source ../scripts/utils/host +# shellcheck disable=SC1091 +source ../scripts/utils/log + +RUSTFLAGS="-C codegen-units=1 -C panic=abort -C strip=symbols -C opt-level=z" \ + cargo build --bin installer-downloader --release |
