about summary refs log tree commit diff
path: root/compiler/rustc_llvm
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-08-28 21:41:03 +0200
committerGitHub <noreply@github.com>2025-08-28 21:41:03 +0200
commita60b96a3d47ca522439df646534dd5e27beb5a07 (patch)
tree0e2a2d0bc7d4b5e153728b1b3a96eafeb6406942 /compiler/rustc_llvm
parentb944a436607be5680a89cc59902ca850adc3f0f5 (diff)
parent23e72ab41e27842eae0d60a6f4750c5151aabcbc (diff)
downloadrust-a60b96a3d47ca522439df646534dd5e27beb5a07.tar.gz
rust-a60b96a3d47ca522439df646534dd5e27beb5a07.zip
Rollup merge of #145965 - bjorn3:sanitize_symbol_export_improvements, r=lqd
Move exporting of profiler and sanitizer symbols to the LLVM backend

Only the LLVM backend needs those specific symbols exported and it only needs them to be exported for LTO, not from cdylibs in general.
Diffstat (limited to 'compiler/rustc_llvm')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 8c34052770e..dd492325814 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -1226,12 +1226,6 @@ extern "C" void LLVMRustPrintPasses() {
 extern "C" void LLVMRustRunRestrictionPass(LLVMModuleRef M, char **Symbols,
                                            size_t Len) {
   auto PreserveFunctions = [=](const GlobalValue &GV) {
-    // Preserve LLVM-injected, ASAN-related symbols.
-    // See also https://github.com/rust-lang/rust/issues/113404.
-    if (GV.getName() == "___asan_globals_registered") {
-      return true;
-    }
-
     // Preserve symbols exported from Rust modules.
     for (size_t I = 0; I < Len; I++) {
       if (GV.getName() == Symbols[I]) {