CheckAtomic.cmake was skipping the test of whether atomics work in MSVC without an atomics library (they do), but not setting the value of HAVE_CXX_ATOMICS_WITHOUT_LIB. That caused build issues when trying to land D69869. I fixed that issue in f128f442a3d, by adding an elseif(MSVC), as was being done below in the 64-bit atomics check. That minimal fix did work, but it kept various inconsistencies between the original atomics check and the 64-bit one. This patch now makes the checks follow the same structure, cleaning them up.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I am happy that this is a simple logic refactoring of the original, given LLVM_COMPILER_IS_GCC_COMPATIBLE is currently just true/false based on the MSVC variable.
I am glad both blocks now have the same structure, which helps when debugging build issues.
LGTM (modulo nits below).
llvm/cmake/modules/CheckAtomic.cmake | ||
---|---|---|
45 | Nit: whitespace before ). | |
66–67 | Nit: whitespace before ). |
Nit: whitespace before ).