rust/compiler/rustc_target/src
Matthias Krüger 4d5a2f3d81
Rollup merge of #105405 - sunfishcode:sunfishcode/export-dynamic, r=TaKO8Ki
Stop passing -export-dynamic to wasm-ld.

-export-dynamic was a temporary hack added in the early days of the Rust wasm32 target when Rust didn't have a way to specify wasm exports in the source code. This flag causes all global symbols, and some compiler-internal symbols, to be exported, which is often more than needed.

Rust now does have a way to specify exports in the source code: `#[export_name = "..."]`.

So as the original comment suggests, -export-dynamic can now be removed, allowing users to have smaller binaries and better encapsulation in their wasm32-unknown-unknown modules.

It's possible that this change will require existing wasm32-unknown-unknown users will to add explicit `#[export_name = "..."]` directives to exporrt the symbols that their programs depend on having exported.
2022-12-08 12:57:30 +01:00
..
abi Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
asm Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
spec Rollup merge of #105405 - sunfishcode:sunfishcode/export-dynamic, r=TaKO8Ki 2022-12-08 12:57:30 +01:00
json.rs Improve generating Custom entry function 2022-11-11 01:04:39 +05:30
lib.rs move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
tests.rs Use serde_json for target spec json 2022-06-03 16:46:19 +00:00