Skip to content
Commit 5ecb5141 authored by Fangrui Song's avatar Fangrui Song
Browse files

[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
parent f5a79713
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment