Skip to content

Commit

Permalink
fixup! Clean up wireguard-go-rs build script
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Jan 16, 2025
1 parent d7109fc commit 8346735
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions wireguard-go-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() -> anyhow::Result<()> {
Os::Windows => build_windows_dynamic_lib(&out_dir)?,
Os::Linux => build_linux_static_lib(&out_dir)?,
Os::Macos => build_macos_static_lib(&out_dir)?,
Os::Android => build_android_dynamic_lib()?,
Os::Android => build_android_dynamic_lib(&out_dir)?,
}

Ok(())
Expand Down Expand Up @@ -443,8 +443,7 @@ fn gather_exports(go_src_path: impl AsRef<Path>) -> anyhow::Result<Vec<String>>

/// Compile libwg as a dynamic library for android and place it in [`android_output_path`].
// NOTE: We use dynamic linking as Go cannot produce static binaries specifically for Android.
fn build_android_dynamic_lib() -> anyhow::Result<()> {
let out_dir = env::var("OUT_DIR").context("Missing OUT_DIR")?;
fn build_android_dynamic_lib(out_dir: &str) -> anyhow::Result<()> {
let target_triple = env::var("TARGET").context("Missing 'TARGET'")?;
let target = AndroidTarget::from_str(&target_triple)?;

Expand Down

0 comments on commit 8346735

Please sign in to comment.