Skip to content

Commit

Permalink
[cmake] Remove unnecessary header include in atomics check
Browse files Browse the repository at this point in the history
The header include was required to work around PR19898, as noted in that
comment. That PR has since been marked resolved fixed, and the
configuration check passes without the header inclusion both when
compiling on Windows with cl and when cross-compiling on Linux using
clang-cl.

I noticed this because the inclusion was cased incorrectly (Intrin.h
instead of intrin.h), which when cross-compiling on a case sensitive
file system would cause the intrin.h from the Windows SDK to be included
(which LLVM can't handle) instead of the one from clang's resource
directory, making the check fail. This is the same issue as r309980.
Correcting the case of the inclusion makes the check pass when cross
compiling, but it seems better to get rid of the inclusion entirely,
since it appears to be unnecessary now.

Differential Revision: https://reviews.llvm.org/D40910

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319917 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
smeenai committed Dec 6, 2017
1 parent 1c65bd2 commit e5a2c5a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion cmake/modules/CheckAtomic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ endif()
## assumes C++11 <atomic> works.
CHECK_CXX_SOURCE_COMPILES("
#ifdef _MSC_VER
#include <Intrin.h> /* Workaround for PR19898. */
#include <windows.h>
#endif
int main() {
Expand Down

0 comments on commit e5a2c5a

Please sign in to comment.