From 614210c69bb7aaed422c3b9384ca2a1d52732159 Mon Sep 17 00:00:00 2001 From: Jeju Date: Tue, 12 Nov 2024 13:26:13 +0100 Subject: [PATCH 1/2] fix linkage for frida-gum script example for macos --- examples/gum/script/build.rs | 3 +++ frida-gum-sys/build.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/gum/script/build.rs b/examples/gum/script/build.rs index 538285b..960a2b5 100644 --- a/examples/gum/script/build.rs +++ b/examples/gum/script/build.rs @@ -1,3 +1,6 @@ fn main() { println!("cargo:rustc-link-arg=-rdynamic"); + + #[cfg(target_os = "macos")] + println!("cargo:rustc-link-lib=dylib=c++"); } diff --git a/frida-gum-sys/build.rs b/frida-gum-sys/build.rs index 236704d..892282d 100644 --- a/frida-gum-sys/build.rs +++ b/frida-gum-sys/build.rs @@ -242,4 +242,7 @@ fn main() { #[cfg(all(feature = "js", target_os = "macos"))] println!("cargo:rustc-link-lib=dylib=c++"); + + #[cfg(all(feature = "js", target_os = "macos"))] + println!("cargo:rustc-link-lib=resolv"); } From bf1b12794d7a34d982b27a1879172e7e356d63b1 Mon Sep 17 00:00:00 2001 From: Jeju Date: Wed, 13 Nov 2024 10:35:35 +0100 Subject: [PATCH 2/2] format --- examples/gum/script/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gum/script/build.rs b/examples/gum/script/build.rs index 960a2b5..71f3e38 100644 --- a/examples/gum/script/build.rs +++ b/examples/gum/script/build.rs @@ -1,6 +1,6 @@ fn main() { println!("cargo:rustc-link-arg=-rdynamic"); - + #[cfg(target_os = "macos")] println!("cargo:rustc-link-lib=dylib=c++"); }