compilers: Add b_lto and b_pgo support for MSVC
Todo:
- Should we add a common BuildOption for COMDAT folding (
/Gy/-ffunction-section+/Gw/-fdata-sectionsfor compilers,/OPT:REF/-Wl,--gc-sections/-Wl,-dead_strip+/OPT:{ICF,SAFEICF,NOICF}[^1]/-Wl,--icf={all,safe,none}[^2]/-Wl,-no_deduplicate[^3] for linkers) - How can we ensure
b_ltois also on ifb_pgois on? - What about
icl.exe?
[^1]: /OPT:SAFEICF is lld-link only
[^2]: ld.gold and ld.lld supports ICF, but not ld.bfd
[^3]: newer ld64 that supports ICF have this on by default, and only have an option for disabling it (-no_deduplicate or -O0 will trigger this, see ld64/src/ld/Options.cpp)
What about icl.exe?
Are we talking about the legacy icl.exe that pairs with icc, or one of the oneAPI (LLVM based) compilers? If we're talking the legacy one leave it be. The oneAPI one is based on clang-cl, so we should be able to do whatever clang-cl does.
Are we talking about the legacy icl.exe that pairs with icc, or one of the oneAPI (LLVM based) compilers?
the legacy one. i'm fine with ignoring it.
need integration with vs2010backend.py
Cygwin failure seems very much unrelated.
Do you want to fix the vs backend first or is this ok to merge already?
The lint failure is related.
done