And add a test. This is followup work to PR 151704. It introduced a regression where cargo is now unwilling to build cdylibs for Emscripten because `crt_static_default` is `true` but `crt_static_allows_dylibs` is `false`. Unfortunately the added test does not fail without the change because the validation logic is in Cargo, not in rustc. But it's good to have some coverage of this anyways.
4 lines
55 B
Rust
4 lines
55 B
Rust
#[no_mangle]
|
|
pub extern "C" fn foo() -> i32 {
|
|
42
|
|
}
|