llvm-project
571beb55 - [compiler-rt] clang-cl: skip MSVC external-header probe; -std=c++ for unit-test compiles (#191564)

Commit
12 days ago
[compiler-rt] clang-cl: skip MSVC external-header probe; -std=c++ for unit-test compiles (#191564) 1. `check_cxx_compiler_flag` marked `COMPILER_RT_HAS_EXTERNAL_FLAG` true for clang-cl, so `/experimental:external` and `/external:anglebrackets` were passed and clang-cl warned they were unused. Now only probe with real MSVC (not Clang); set the flag false otherwise; rely on that in asan/interception/ubsan. 2. Custom compile lines for unit tests didn’t get C++17, so headers hit `-Wc++17-extensions` (e.g. `constexpr if` / message-less `static_assert` in FuzzedDataProvider / asan_fake_stack). Now append `-std=c++${CMAKE_CXX_STANDARD}` or `-std=c++17` for C++ sources in `clang_compile()` for both standalone and non-standalone builds.
Author
Parents
Loading