diff options
| author | Joakim Hulthe <joakim@hulthe.net> | 2025-08-05 11:15:11 +0200 |
|---|---|---|
| committer | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-08-05 12:50:56 +0200 |
| commit | a67a8065bf1f4fe63c02c616f2803bd7ce1067c0 (patch) | |
| tree | 21938771440720a0bce663dec28f7d654b5a1cfd | |
| parent | f367d4032bb36e1e3be449489f78feb7675dc954 (diff) | |
| download | mullvadvpn-a67a8065bf1f4fe63c02c616f2803bd7ce1067c0.tar.xz mullvadvpn-a67a8065bf1f4fe63c02c616f2803bd7ce1067c0.zip | |
Add `--boringtun` flag to build.sh
| -rwxr-xr-x | build.sh | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -31,6 +31,8 @@ NOTARIZE="false" # If a macOS or Windows build should create an installer artifact working on both # x86 and arm64 UNIVERSAL="false" +# Use boringtun instead of wireguard-go +BORINGTUN="false" while [[ "$#" -gt 0 ]]; do case $1 in @@ -44,6 +46,7 @@ while [[ "$#" -gt 0 ]]; do fi UNIVERSAL="true" ;; + --boringtun) BORINGTUN="true";; *) log_error "Unknown parameter: $1" exit 1 @@ -74,6 +77,7 @@ fi NPM_PACK_ARGS+=(--host-target-triple "$HOST") + if [[ "$UNIVERSAL" == "true" ]]; then if [[ -n ${TARGETS:-""} ]]; then log_error "'TARGETS' and '--universal' cannot be specified simultaneously." @@ -232,6 +236,12 @@ function build { if [[ -n $specified_target ]]; then cargo_target_arg+=(--target="$specified_target") fi + + local cargo_features=() + if [[ "$BORINGTUN" == "true" ]]; then + cargo_features+=(--features boringtun) + fi + local cargo_crates_to_build=( -p mullvad-daemon --bin mullvad-daemon -p mullvad-cli --bin mullvad @@ -242,7 +252,8 @@ function build { if [[ ("$(uname -s)" == "Linux") ]]; then cargo_crates_to_build+=(-p mullvad-exclude --bin mullvad-exclude) fi - cargo build "${cargo_target_arg[@]}" "${CARGO_ARGS[@]}" "${cargo_crates_to_build[@]}" + + cargo build "${cargo_target_arg[@]}" "${cargo_features[@]}" "${CARGO_ARGS[@]}" "${cargo_crates_to_build[@]}" ################################################################################ # Move binaries to correct locations in dist-assets |
