v8 uses this technique to check for x32: #if defined(__x86_64__) && !defined(__LP64__) ... #endif With cl.exe, this works as cl.exe doesn't define __x86_64__. With clang-cl, this fails since clang-cl does define __x86_64__ but doesn't define __LP64__ (because Windows is LLP64). clang-cl probably shouldn't define __x86_64__? It already defines the cl-equivalent _M_X64. https://codereview.chromium.org/18014003/diff/161001/src/base/build_config.h
Opinions?
After talking to Hans, it seems better to change v8 to check __SIZEOF_POINTER__ instead. That works with gcc and clang, and is less brittle than what they currently do.
Sounds good, here's the comment I wrote before you closed it. :) ---- This came up in discussion for r212753: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140707/109607.html http://reviews.llvm.org/D4419 Basically, I think things will be even *more* confusing if we stop defining the Unix / GCC / Clang style target macros. We can change Clang's *mmintrin.h headers to look for MSVC-style macros, but I expect there is other code out there that has similar checks. I'm open to being wrong, though. Win64 is clearly a non-LP64 x86_64 target, so I don't think that is the correct way to test for x32. According to the x32 glibc wiki page, they should test for __ILP32__: https://sourceware.org/glibc/wiki/x32
(v8 cl: https://codereview.chromium.org/560903002/)