summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoakim Hulthe <joakim@hulthe.net>2024-03-13 15:14:41 +0100
committerDavid Lönnhager <david.l@mullvad.net>2024-03-13 17:52:16 +0100
commit1b8c2385266b72d26bfdc2f44df4cde6b2cd545d (patch)
tree96bfdbd6da826f91de10f9dde9070cb8ef2a5aee
parent9760ca141281a826933ba14f73c8fb0571f444ef (diff)
downloadmullvadvpn-1b8c2385266b72d26bfdc2f44df4cde6b2cd545d.tar.xz
mullvadvpn-1b8c2385266b72d26bfdc2f44df4cde6b2cd545d.zip
Fix cross-checking talpid-wireguard for windows
The `wireguard_go` cfg shouldn't be included when compiling towards windows. This change makes `cargo c --target x86_64-pc-windows-gnu` work on linux again.
-rw-r--r--talpid-wireguard/build.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/talpid-wireguard/build.rs b/talpid-wireguard/build.rs
index 91a4a4e5d3..1b77dd3873 100644
--- a/talpid-wireguard/build.rs
+++ b/talpid-wireguard/build.rs
@@ -21,8 +21,9 @@ fn main() {
println!("cargo:rustc-link-lib{link_type}=wg");
- #[cfg(any(target_os = "linux", target_os = "macos", target_os = "android"))]
- println!("cargo:rustc-cfg=wireguard_go");
+ if let "linux" | "macos" | "android" = target_os.as_str() {
+ println!("cargo:rustc-cfg=wireguard_go");
+ }
}
fn declare_libs_dir(base: &str) {