Newer
Older
From 18348bd65ce67bcd6f85e309f126792a96732943 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Thu, 1 Sep 2022 21:33:29 +0530
Subject: [PATCH] Fix linking with Android NDK linker
Android ld.gold cannot handle -Wl, and it's incorrect anyway since all
the other linker arguments passed by cargo do not have a -Wl prefix.
---
src/target.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/target.rs b/src/target.rs
--- a/src/target.rs
+++ b/src/target.rs
@@ -70,7 +70,7 @@ impl Target {
let env = &self.env;
if os == "android" {
- lines.push(format!("-Wl,-soname,lib{lib_name}.so"));
+ lines.push(format!("-soname,lib{lib_name}.so"));
} else if os == "linux"
|| os == "freebsd"
|| os == "dragonfly"
--