diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-11-15 05:25:41 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-11-15 05:25:41 +0000 |
| commit | 26a7772ecd52df928080a55fca225416997c1bae (patch) | |
| tree | 3c71fa19e95e87043ce87ee7cdf95309afa2a477 /compiler/rustc_llvm/llvm-wrapper | |
| parent | e459b8a46f82a3e756c11a8e04b9b653f9471472 (diff) | |
| parent | 29acf8b422ab446fa4cd51fbb0e5a145f30c1cfc (diff) | |
| download | rust-26a7772ecd52df928080a55fca225416997c1bae.tar.gz rust-26a7772ecd52df928080a55fca225416997c1bae.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 15 |
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) { |
