diff options
| author | Nathan Corbyn <me@nathancorbyn.com> | 2020-06-08 09:37:11 +0100 |
|---|---|---|
| committer | Nathan Corbyn <me@nathancorbyn.com> | 2020-06-15 09:40:56 +0100 |
| commit | 6b7cacb2c99567a76cf0d5ce6833a129c8bb8814 (patch) | |
| tree | f0a358cb6e0cb9ea6a0aeedc366b00dd66b3a4a9 /src/librustc_codegen_ssa | |
| parent | f62903b74a8630fa62e721f69e6621d1d441e7f1 (diff) | |
| download | rust-6b7cacb2c99567a76cf0d5ce6833a129c8bb8814.tar.gz rust-6b7cacb2c99567a76cf0d5ce6833a129c8bb8814.zip | |
Export all fns with extern indicator
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/back/symbol_export.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs index bf8693f3547..98f7da8361c 100644 --- a/src/librustc_codegen_ssa/back/symbol_export.rs +++ b/src/librustc_codegen_ssa/back/symbol_export.rs @@ -90,10 +90,11 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, cnum: CrateNum) -> DefIdMap< let def_id = tcx.hir().local_def_id(hir_id); let generics = tcx.generics_of(def_id); if !generics.requires_monomorphization(tcx) - && (!Instance::mono(tcx, def_id.to_def_id()) - .def - .generates_cgu_internal_copy(tcx) - || tcx.inline_exportable(def_id.to_def_id())) + // Functions marked with #[inline] are codegened with "internal" + // linkage and are not exported unless marked with an extern + // inidicator + && (!Instance::mono(tcx, def_id.to_def_id()).def.generates_cgu_internal_copy(tcx) + || tcx.codegen_fn_attrs(def_id.to_def_id()).contains_extern_indicator()) { Some(def_id) } else { |
