Skip to content

Commit

Permalink
Fix android build
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Jun 4, 2024
1 parent 776de44 commit 346ddac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions mullvad-daemon/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down
2 changes: 0 additions & 2 deletions wireguard-go-rs/libwg/build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 346ddac

Please sign in to comment.