-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[JITLink][Cygwin] undef i386 in JITLink/i386.h #138218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
i686 cygwin gcc has a default define of i386 to 1, which conflicts with a namespace named i386, so undef it.
@mstorsjo I was going through my patches and found a couple tiny ones that I hadn't submitted yet |
I was about to suggest that you wrap this in But then I checked and noticed that GCC also does With both GCC and Clang (and also tested with a cygwin targeting GCC), the So the root cause/question here is why your build doesn't seem to be using It turns out that was straightforward to figure out too - see this cmake snippet: if (CYGWIN)
# Cygwin is a bit stricter and lack things like 'strdup', 'stricmp', etc in
# c++xx mode.
set(CMAKE_CXX_EXTENSIONS YES)
else()
set(CMAKE_CXX_EXTENSIONS NO)
endif() I guess one question that stands is whether this still is the case, or if we could remove this. If it still is needed, then we do need this PR; so for that case, adding an |
I'm betting it's OK now, because we already have to define |
Not entirely sure offhand; there's a couple of different ones in |
that seems to work building with clang. I'll do another build with gcc to confirm and then close this PR in favor of removing that cmake if that you helpfully found. That's much better than a random |
|
i686 cygwin gcc has a default define of i386 to 1, which conflicts with a namespace named i386, so undef it.