@@ -15,7 +15,7 @@ use rustc_middle::ty::{self, GenericArgKind, GenericArgsRef, Instance, SymbolNam
15
15
use rustc_middle:: util:: Providers ;
16
16
use rustc_session:: config:: { CrateType , OomStrategy } ;
17
17
use rustc_symbol_mangling:: mangle_internal_symbol;
18
- use rustc_target:: spec:: { SanitizerSet , TlsModel } ;
18
+ use rustc_target:: spec:: TlsModel ;
19
19
use tracing:: debug;
20
20
21
21
use crate :: base:: allocator_kind_for_codegen;
@@ -242,53 +242,6 @@ fn exported_non_generic_symbols_provider_local<'tcx>(
242
242
}
243
243
}
244
244
245
- if tcx. sess . instrument_coverage ( ) || tcx. sess . opts . cg . profile_generate . enabled ( ) {
246
- // These are weak symbols that point to the profile version and the
247
- // profile name, which need to be treated as exported so LTO doesn't nix
248
- // them.
249
- const PROFILER_WEAK_SYMBOLS : [ & str ; 2 ] =
250
- [ "__llvm_profile_raw_version" , "__llvm_profile_filename" ] ;
251
-
252
- symbols. extend ( PROFILER_WEAK_SYMBOLS . iter ( ) . map ( |sym| {
253
- let exported_symbol = ExportedSymbol :: NoDefId ( SymbolName :: new ( tcx, sym) ) ;
254
- (
255
- exported_symbol,
256
- SymbolExportInfo {
257
- level : SymbolExportLevel :: C ,
258
- kind : SymbolExportKind :: Data ,
259
- used : false ,
260
- rustc_std_internal_symbol : false ,
261
- } ,
262
- )
263
- } ) ) ;
264
- }
265
-
266
- if tcx. sess . opts . unstable_opts . sanitizer . contains ( SanitizerSet :: MEMORY ) {
267
- let mut msan_weak_symbols = Vec :: new ( ) ;
268
-
269
- // Similar to profiling, preserve weak msan symbol during LTO.
270
- if tcx. sess . opts . unstable_opts . sanitizer_recover . contains ( SanitizerSet :: MEMORY ) {
271
- msan_weak_symbols. push ( "__msan_keep_going" ) ;
272
- }
273
-
274
- if tcx. sess . opts . unstable_opts . sanitizer_memory_track_origins != 0 {
275
- msan_weak_symbols. push ( "__msan_track_origins" ) ;
276
- }
277
-
278
- symbols. extend ( msan_weak_symbols. into_iter ( ) . map ( |sym| {
279
- let exported_symbol = ExportedSymbol :: NoDefId ( SymbolName :: new ( tcx, sym) ) ;
280
- (
281
- exported_symbol,
282
- SymbolExportInfo {
283
- level : SymbolExportLevel :: C ,
284
- kind : SymbolExportKind :: Data ,
285
- used : false ,
286
- rustc_std_internal_symbol : false ,
287
- } ,
288
- )
289
- } ) ) ;
290
- }
291
-
292
245
// Sort so we get a stable incr. comp. hash.
293
246
symbols. sort_by_cached_key ( |s| s. 0 . symbol_name_for_local_instance ( tcx) ) ;
294
247
0 commit comments