Skip to content

Commit 203b622

Browse files
committed
Remove unnecessary update_symbols call
For cg_llvm update_symbols merely sets a flag, so changing the position or removing an additional call doesn't have any effect.
1 parent 502d6aa commit 203b622

File tree

1 file changed

+5
-11
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+5
-11
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+5-11
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
333333
ab.inject_dll_import_lib(&raw_dylib_name, &raw_dylib_imports, tmpdir);
334334
}
335335

336-
// After adding all files to the archive, we need to update the
337-
// symbol table of the archive.
338-
ab.update_symbols();
339-
340336
// Note that it is important that we add all of our non-object "magical
341337
// files" *after* all of the object files in the archive. The reason for
342338
// this is as follows:
@@ -365,13 +361,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
365361
// normal linkers for the platform.
366362
let metadata = create_rmeta_file(sess, codegen_results.metadata.raw_data());
367363
ab.add_file(&emit_metadata(sess, &metadata, tmpdir));
368-
369-
// After adding all files to the archive, we need to update the
370-
// symbol table of the archive. This currently dies on macOS (see
371-
// #11162), and isn't necessary there anyway
372-
if !sess.target.is_like_osx {
373-
ab.update_symbols();
374-
}
375364
}
376365

377366
RlibFlavor::StaticlibBase => {
@@ -381,6 +370,11 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
381370
}
382371
}
383372
}
373+
374+
// After adding all files to the archive, we need to update the
375+
// symbol table of the archive.
376+
ab.update_symbols();
377+
384378
return Ok(ab);
385379
}
386380

0 commit comments

Comments
 (0)