mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[c] Force cc to not link to stdc++
This commit is contained in:
parent
b171e10da6
commit
715abbc171
@ -25,6 +25,10 @@ fn main() {
|
||||
// Always avoid C++ runtime (consistent with no-cpprt approach)
|
||||
cpp_build.flag("-nostdlib++");
|
||||
|
||||
// Tell cc crate linker to not link libc++
|
||||
cpp_build.flag_if_supported("-Wl,-undefined,dynamic_lookup");
|
||||
cpp_build.cpp_link_stdlib(None);
|
||||
|
||||
if is_wasm {
|
||||
// For WASM, we may need additional setup, but let's first try without extra flags
|
||||
// The target is already handled by cc-rs when building for wasm32-unknown-unknown
|
||||
@ -67,6 +71,9 @@ fn main() {
|
||||
// Add spine-c extensions
|
||||
cpp_build.file(spine_c_dir.join("src/extensions.cpp"));
|
||||
|
||||
// Add no-cpprt.cpp for C++ runtime stubs
|
||||
cpp_build.file(spine_cpp_dir.join("src/no-cpprt.cpp"));
|
||||
|
||||
cpp_build.compile("spine");
|
||||
|
||||
// Link libraries - no C++ stdlib since we're using no-cpprt variant
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user