@@ -63,7 +63,7 @@ use rustc_errors::{ErrorReported, Handler};
63
63
use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
64
64
use rustc_middle:: middle:: cstore:: EncodedMetadata ;
65
65
use rustc_middle:: ty:: TyCtxt ;
66
- use rustc_session:: config:: { CrateType , Lto , OptLevel , OutputFilenames } ;
66
+ use rustc_session:: config:: { Lto , OptLevel , OutputFilenames } ;
67
67
use rustc_session:: Session ;
68
68
use rustc_span:: Symbol ;
69
69
use rustc_span:: fatal_error:: FatalError ;
@@ -106,16 +106,8 @@ impl CodegenBackend for GccCodegenBackend {
106
106
Ok ( ( codegen_results, work_products) )
107
107
}
108
108
109
- fn link ( & self , sess : & Session , mut codegen_results : CodegenResults , outputs : & OutputFilenames ) -> Result < ( ) , ErrorReported > {
109
+ fn link ( & self , sess : & Session , codegen_results : CodegenResults , outputs : & OutputFilenames ) -> Result < ( ) , ErrorReported > {
110
110
use rustc_codegen_ssa:: back:: link:: link_binary;
111
- if let Some ( symbols) = codegen_results. crate_info . exported_symbols . get_mut ( & CrateType :: Dylib ) {
112
- // TODO:(antoyo): remove when global initializer work without calling a function at runtime.
113
- // HACK: since this codegen add some symbols (e.g. __gccGlobalCrateInit) and the UI
114
- // tests load libstd.so as a dynamic library, and rustc use a version-script to specify
115
- // the symbols visibility, we add * to export all symbols.
116
- // It seems other symbols from libstd/libcore are causing some issues here as well.
117
- symbols. push ( "*" . to_string ( ) ) ;
118
- }
119
111
120
112
link_binary :: < crate :: archive:: ArArchiveBuilder < ' _ > > (
121
113
sess,
0 commit comments