[Driver] Pass -plugin-opt=O2 for -Os -Oz and -plugin-opt=O1 for -Og
Fixes PR42445 (compiler driver options -Os -Oz translate to -plugin-opt=Os (Oz) which are not recognized by LLVMgold.so or LLD). The optimization level mapping matches CompilerInvocation.cpp:getOptimizationLevel() and SpeedLevel of PassBuilder::OptimizationLevel::O*. -plugin-opt=O* affects the way we construct regular LTO/ThinLTO pass manager pipeline. Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D79919
Loading
Please sign in to comment