about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-11-14 10:59:49 +0000
committerbors <bors@rust-lang.org>2024-11-14 10:59:49 +0000
commita4cedecc9ec76b46dcbb954750068c832cf2dd43 (patch)
tree5cca9e887688858b4d1473a3c5d322e3c6fe7593 /compiler
parentdae7ac133b9eda152784c075facb31a6688c92b1 (diff)
parente6cd8699eab4c434a54c92aa1747e97dc5da3663 (diff)
downloadrust-a4cedecc9ec76b46dcbb954750068c832cf2dd43.tar.gz
rust-a4cedecc9ec76b46dcbb954750068c832cf2dd43.zip
Auto merge of #133032 - GuillaumeGomez:rollup-vqakdmw, r=GuillaumeGomez
Rollup of 5 pull requests

Successful merges:

 - #132010 (ci: Enable full `debuginfo-level=2` in `DEPLOY_ALT`)
 - #132310 (compiletest: add `max-llvm-major-version` directive)
 - #132773 (PassWrapper: disable UseOdrIndicator for Asan Win32)
 - #133013 (compiletest: known-bug / crashes: allow for an "auxiliary" directory to contain files that do not have a "known-bug" directive)
 - #133027 (Fix a copy-paste issue in the NuttX raw type definition)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 1ed702ab4cb..489c911d7ee 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -882,10 +882,12 @@ extern "C" LLVMRustResult LLVMRustOptimize(
         SanitizerOptions->SanitizeKernelAddress) {
       OptimizerLastEPCallbacks.push_back(
 #if LLVM_VERSION_GE(20, 0)
-          [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level,
-                             ThinOrFullLTOPhase phase) {
+          [SanitizerOptions, TM](ModulePassManager &MPM,
+                                 OptimizationLevel Level,
+                                 ThinOrFullLTOPhase phase) {
 #else
-          [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
+          [SanitizerOptions, TM](ModulePassManager &MPM,
+                                 OptimizationLevel Level) {
 #endif
             auto CompileKernel = SanitizerOptions->SanitizeKernelAddress;
             AddressSanitizerOptions opts = AddressSanitizerOptions{
@@ -895,7 +897,12 @@ extern "C" LLVMRustResult LLVMRustOptimize(
                 /*UseAfterScope=*/true,
                 AsanDetectStackUseAfterReturnMode::Runtime,
             };
-            MPM.addPass(AddressSanitizerPass(opts));
+            MPM.addPass(AddressSanitizerPass(
+                opts,
+                /*UseGlobalGC*/ true,
+                // UseOdrIndicator should be false on windows machines
+                // https://reviews.llvm.org/D137227
+                !TM->getTargetTriple().isOSWindows()));
           });
     }
     if (SanitizerOptions->SanitizeHWAddress) {