--sysroot might cause inconsistency between the header gets used and the
library gets linked on Apple platform. Use -isysroot instead.
Details
- Reviewers
danalbert
Diff Detail
Event Timeline
Sorry, made a typo on the previous patch.
A little background information. When the greendragon jenkins make an
system upgrade in the future, it will need this flag as well to build and
test libcxx through cmake/ninja.
That works as well. I am not sure if there is any specific reason for using "--sysroot" so I proposed a safer fix.
You need to use the CMake option CMAKE_OSX_SYSROOT to manage the system root because lib/CMakeLists.txt uses "CMAKE_OSX_SYSROOT" to find the correct libc++abi.dylib.
Have you tried that? It is unfortunate that Linux and OS X use different options for the same thing though. Maybe we could set CMAKE_OSX_SYSROOT internally based on LIBCXX_SYSROOT?
I'm resigning as a reviewer. I suggested an alternative fix and explained why this fix wasn't correct in a comment above.
Please re-add me as a reviewer if you disagree with my analysis.