diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-01-16 09:36:21 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-01-24 17:35:04 +0100 |
| commit | 0bb18d6a7866e9056f38fb706f5b70ca0e154c40 (patch) | |
| tree | 7ad98c8a0dca9decbe31604a6f4ccf9225ed7087 | |
| parent | 30a730edc7b556721ae60668517063d22eecd14a (diff) | |
| download | mullvadvpn-0bb18d6a7866e9056f38fb706f5b70ca0e154c40.tar.xz mullvadvpn-0bb18d6a7866e9056f38fb706f5b70ca0e154c40.zip | |
Fix debug profile selection in wireguard-go-rs
| -rw-r--r-- | wireguard-go-rs/build.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/wireguard-go-rs/build.rs b/wireguard-go-rs/build.rs index a0e3b4d1a5..4a99a9a6d6 100644 --- a/wireguard-go-rs/build.rs +++ b/wireguard-go-rs/build.rs @@ -233,7 +233,11 @@ fn build_desktop_lib(target_os: Os) -> anyhow::Result<()> { // Build dynamically library for maybenot fn build_shared_maybenot_lib(out_dir: impl AsRef<Path>) -> anyhow::Result<()> { let target_triple = env::var("TARGET").context("Missing 'TARGET'")?; - let profile = env::var("PROFILE").context("Missing 'PROFILE'")?; + let profile_category = env::var("PROFILE").context("Missing 'PROFILE'")?; + let profile = match profile_category.as_str() { + "release" => "release", + _ => "dev", + }; let mut build_command = Command::new("cargo"); @@ -255,12 +259,12 @@ fn build_shared_maybenot_lib(out_dir: impl AsRef<Path>) -> anyhow::Result<()> { // Set temporary target dir to prevent deadlock .env("CARGO_TARGET_DIR", &tmp_build_dir) .arg("build") - .args(["--profile", &profile]) + .args(["--profile", profile]) .args(["--target", &target_triple]); exec(build_command)?; - let artifacts_dir = tmp_build_dir.join(target_triple).join(profile); + let artifacts_dir = tmp_build_dir.join(target_triple).join(profile_category); // Copy library to desired target dir for (src_filename, dest_filename) in [ |
