c++_shared crashed, c++_static crashed, no stdlib crashed. The remaining variable isolated to cc::Build::new().cpp(true) itself is the C++ compile-mode invocation of clang++. Rename cpp_smoke.cpp → cpp_smoke.c and drop .cpp(true), leaving a plain-C cc::Build that compiles the exact same bytes (minus the 'extern "C"' linkage spec which is C++- only syntax). This is structurally identical to Step A (hello.c), which worked. If THIS build launches, the diff between 'works' and 'crashes' is purely the .cpp(true) mode — something clang++ does differently at compile or link time when producing object files for a Tauri Android cdylib. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 lines
356 B
C
10 lines
356 B
C
// cpp_smoke.c — Step E.minus-1: same content as the crashing .cpp file
|
|
// but as plain C. No extern "C" linkage spec (that's C++-only syntax;
|
|
// in C every function has C linkage by default). If this crashes we
|
|
// know cc::Build is being wrongly accused — the trigger must be more
|
|
// general than C++ mode.
|
|
|
|
int wzp_cpp_hello(void) {
|
|
return 42;
|
|
}
|