================
@@ -700,7 +700,12 @@ static void addSanitizers(const Triple &TargetTriple,
                           const CodeGenOptions &CodeGenOpts,
                           const LangOptions &LangOpts, PassBuilder &PB) {
   auto SanitizersCallback = [&](ModulePassManager &MPM, OptimizationLevel 
Level,
-                                ThinOrFullLTOPhase) {
+                                ThinOrFullLTOPhase phase) {
+    // FatLTO pipelines already added these to the prelink pipeline.
+    if (CodeGenOpts.FatLTO &&
+        (CodeGenOpts.PrepareForThinLTO || CodeGenOpts.PrepareForLTO) &&
+        ThinOrFullLTOPhase::None != phase)
----------------
nikic wrote:

To clarify, I don't mean using a different pipeline, just passing a different 
phase parameter. I think that should barely affect the behavior of 
buildModuleOptimizationPipeline apart from passing a different phase to the 
pipeline callbacks.

https://github.com/llvm/llvm-project/pull/160213
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to