about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/back
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-10 04:18:39 +0900
committerGitHub <noreply@github.com>2020-01-10 04:18:39 +0900
commit8de73bc10c4bba39b4e5f898e17981b81e3b9443 (patch)
tree2ab0cf521bf07d4c8ce7100a5a1c1e41839abae7 /src/librustc_codegen_ssa/back
parent08c5999dc44c49e77098f532f14b6eff36bb2c40 (diff)
parentf1fb384cd62dc13d0b4647c9f988f6f46cbf4b6f (diff)
Rollup merge of #67975 - EmbarkStudios:export-statics-wasm, r=alexcrichton
Export public scalar statics in wasm

Fixes #67453

I am not sure which export level statics should get when exporting them in wasm. This small change fixes the issue that I had, but this might not be the correct way to implement this.
Diffstat (limited to 'src/librustc_codegen_ssa/back')
-rw-r--r--src/librustc_codegen_ssa/back/symbol_export.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs
index edd0fa50427..a406b5f103b 100644
--- a/src/librustc_codegen_ssa/back/symbol_export.rs
+++ b/src/librustc_codegen_ssa/back/symbol_export.rs
@@ -345,7 +345,7 @@ fn symbol_export_level(tcx: TyCtxt<'_>, sym_def_id: DefId) -> SymbolExportLevel
     if is_extern && !std_internal {
         let target = &tcx.sess.target.target.llvm_target;
         // WebAssembly cannot export data symbols, so reduce their export level
-        if target.contains("wasm32") || target.contains("emscripten") {
+        if target.contains("emscripten") {
             if let Some(Node::Item(&hir::Item { kind: hir::ItemKind::Static(..), .. })) =
                 tcx.hir().get_if_local(sym_def_id)
             {