diff options
| author | Jethro Beekman <jethro@fortanix.com> | 2018-11-19 15:04:28 +0530 |
|---|---|---|
| committer | Jethro Beekman <jethro@fortanix.com> | 2018-11-19 23:24:43 +0530 |
| commit | a44e446551a7251a06c23caa97aebcfbb98c79b2 (patch) | |
| tree | 18f14e0c4ad92385f2770012956f4472de2d5583 /src/librustc_codegen_ssa/back | |
| parent | 7e82eda000c8d4abbdaa76b3563cd77f938fc411 (diff) | |
| download | rust-a44e446551a7251a06c23caa97aebcfbb98c79b2.tar.gz rust-a44e446551a7251a06c23caa97aebcfbb98c79b2.zip | |
Add `override_export_symbols` option to Rust target specification
Diffstat (limited to 'src/librustc_codegen_ssa/back')
| -rw-r--r-- | src/librustc_codegen_ssa/back/linker.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs index da9cfbb94d1..ec5ca580104 100644 --- a/src/librustc_codegen_ssa/back/linker.rs +++ b/src/librustc_codegen_ssa/back/linker.rs @@ -1050,6 +1050,10 @@ impl<'a> Linker for WasmLd<'a> { } fn exported_symbols(tcx: TyCtxt, crate_type: CrateType) -> Vec<String> { + if let Some(ref exports) = tcx.sess.target.target.options.override_export_symbols { + return exports.clone() + } + let mut symbols = Vec::new(); let export_threshold = symbol_export::crates_export_threshold(&[crate_type]); |
