diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2025-02-06 14:25:06 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2025-02-07 13:34:29 +0100 |
| commit | 48676ef8c7317c0ebaea453be64de6bf7ebe3ff2 (patch) | |
| tree | b7db9f4f576210bf8d947e2555cf7e0752c37384 | |
| parent | 0daac837ed4e977a8dbe2bd6adc351d0fd5f075b (diff) | |
| download | mullvadvpn-48676ef8c7317c0ebaea453be64de6bf7ebe3ff2.tar.xz mullvadvpn-48676ef8c7317c0ebaea453be64de6bf7ebe3ff2.zip | |
Update windows build to use new maybenot
Adds --locked to enforce lockfile, and explicitly build as shared
library
| -rw-r--r-- | wireguard-go-rs/build.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/wireguard-go-rs/build.rs b/wireguard-go-rs/build.rs index f13f034116..a544e4e161 100644 --- a/wireguard-go-rs/build.rs +++ b/wireguard-go-rs/build.rs @@ -268,11 +268,16 @@ fn build_shared_maybenot_lib(out_dir: impl AsRef<Path>) -> anyhow::Result<()> { tmp_build_dir = tmp_build_dir.join("target"); build_command - .current_dir("./libwg/wireguard-go/maybenot/crates/maybenot-ffi") + .current_dir("./libwg/wireguard-go/maybenot-ffi") .env("RUSTFLAGS", "-C metadata=maybenot-ffi -Ctarget-feature=+crt-static") - // Set temporary target dir to prevent deadlock + // Set temporary target dir to prevent deadlock, since we are invoking cargo from within + // another cargo process. .env("CARGO_TARGET_DIR", &tmp_build_dir) - .arg("build") + .arg("rustc") + // Build a shared library to consume from another language (go) + .arg("--crate-type=cdylib") + // Always respect lockfiles + .args(["--locked"]) .args(["--profile", profile]) .args(["--target", &target_triple]); |
