Use clang driver on MinGW where clang-cl is not usable. MSVC target
still uses clang-cl to minimize changes to existing test runners.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/test/asan/lit.cfg.py | ||
---|---|---|
166 | please use substitutions instead |
IIUC -Od in MSVC (disable optimizations) is the default. -O0 is the default in Clang. Can we remove %Od from RUN lines?
I'm not sure. Digging through the history shows they were previously using -O0 until that flag was replaced in https://reviews.llvm.org/D64506. The first instance of -O0 being added to the asan tests was https://reviews.llvm.org/D3767 with no explanation why it was needed. Curiously it seems only Windows tests using clang-cl had this flag. Was the default opt level for clang-cl different back then?
For cl.exe, https://learn.microsoft.com/en-us/cpp/build/reference/o-options-optimize-code?view=msvc-170 seems to indicate that /Ot is the default. Of course clang-cl doesn't have to match that, but I wonder if there is a possibility it may change in the future.
please use substitutions instead