From 346ddac92995b039adbd7581cc20c5b36b62b601 Mon Sep 17 00:00:00 2001 From: Markus Pettersson Date: Wed, 29 May 2024 17:33:50 +0200 Subject: [PATCH] Fix android build --- mullvad-daemon/build.rs | 5 +++-- wireguard-go-rs/libwg/build-android.sh | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mullvad-daemon/build.rs b/mullvad-daemon/build.rs index 90e64104f73c..6ada22967642 100644 --- a/mullvad-daemon/build.rs +++ b/mullvad-daemon/build.rs @@ -40,11 +40,12 @@ fn main() { // when development, configure rpath to facilitate linking with libwg.so if matches!(target_os.as_str(), "linux" | "macos" | "android") && cfg!(debug_assertions) { let target = std::env::var("TARGET").expect("TARGET not set"); - let relative = std::path::Path::new("../build/lib/").join(target.clone()); + let relative = std::path::Path::new("../build/lib/"); let absolute = std::fs::canonicalize(relative).unwrap_or_else(|_| { panic!("Could not resolve canonical path for relative path `build/lib/{target}`") }); - println!("cargo::rustc-link-arg=-Wl,-rpath,{}", absolute.display()); + let x = absolute.join(target.clone()); + println!("cargo::rustc-link-arg=-Wl,-rpath,{}", x.display()); } } diff --git a/wireguard-go-rs/libwg/build-android.sh b/wireguard-go-rs/libwg/build-android.sh index 750438c503dd..0c2336185ada 100755 --- a/wireguard-go-rs/libwg/build-android.sh +++ b/wireguard-go-rs/libwg/build-android.sh @@ -57,8 +57,6 @@ for arch in ${ARCHITECTURES:-armv7 aarch64 x86_64 i686}; do # Set permissions so that the build server can clean the outputs afterwards chmod 777 "$STRIPPED_LIB_PATH" - - rm -rf build done # ensure `git clean -fd` does not require root permissions