From 2dec6205c880ed8d69efd8026ca8d404ba33eb5e Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Mon, 14 Jul 2025 15:47:46 -0700 Subject: [PATCH] fix: only link c++_shared, don't link c++ always --- packages/cli/src/build/request.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/build/request.rs b/packages/cli/src/build/request.rs index a9e7bfe58..c773b9620 100644 --- a/packages/cli/src/build/request.rs +++ b/packages/cli/src/build/request.rs @@ -662,7 +662,6 @@ impl BuildRequest { "-Clink-arg=-landroid".to_string(), "-Clink-arg=-llog".to_string(), "-Clink-arg=-lOpenSLES".to_string(), - "-Clink-arg=-lc++".to_string(), "-Clink-arg=-lc++abi".to_string(), "-Clink-arg=-Wl,--export-dynamic".to_string(), format!( @@ -1129,9 +1128,9 @@ impl BuildRequest { } } - // On android, the c++_static flag means we need to copy the libc++_shared.so precompiled + // On android, the c++_shared flag means we need to copy the libc++_shared.so precompiled // library to the jniLibs folder - if arg.contains("-lc++_static") && self.platform == Platform::Android { + if arg.contains("-lc++_shared") && self.platform == Platform::Android { std::fs::copy( self.workspace.android_tools()?.libcpp_shared(&self.triple), framework_dir.join("libc++_shared.so"),