This change adds the system libc++ header location to the driver. As well we define
the __LIBC_NO_CPP_MATH_OVERLOADS__ macro when using those headers, in order to suppress
conflicting C++ overloads in the system libc headers that were used by XL C++.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Driver/ToolChains/AIX.cpp | ||
---|---|---|
237 | Maybe a comment as to why we need this, something like: // Required order to suppress conflicting C++ overloads in the system libc headers that were used by XL C++ | |
240–242 | nit: it would be my preference to have the error case first but I also that AIX::AddCXXStdlibLibArgs is set up the same way so keeping them consistent may be more important. |
clang/lib/Driver/ToolChains/AIX.cpp | ||
---|---|---|
240–242 | Flipping the cases in both places for consistency should be fairly straight forward, so I think that's ok. |
clang/test/Driver/aix-toolchain-include.cpp | ||
---|---|---|
31 | It looks like this test is failing the pre-merge check on the x86 bot because this variable isn't captured correctly. Eg. I found this test/Driver/darwin-header-search-libcxx.cpp and https://llvm.org/docs/CommandGuide/FileCheck.html#cmdoption-filecheck-d-var. |
clang/test/Driver/aix-toolchain-include.cpp | ||
---|---|---|
31 | Hmm, it seems it's not so much that the capture isn't working, but likely that we don't expect windows directory separators in the match. Regardless, I'll update the test. |
Maybe a comment as to why we need this, something like: