[PATCH] D12644: Using -isysroot on Apple platform
Steven Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 4 13:41:31 PDT 2015
steven_wu created this revision.
steven_wu added a reviewer: EricWF.
steven_wu added a subscriber: cfe-commits.
--sysroot might cause inconsistency between the header gets used and the
library gets linked on Apple platform. Use -isysroot instead.
http://reviews.llvm.org/D12644
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -209,7 +209,11 @@
# Target flags ================================================================
add_flags_if(LIBCXX_BUILD_32_BITS -m32)
add_flags_if(LIBCXX_TARGET_TRIPLE "-target ${LIBCXX_TARGET_TRIPLE}")
-add_flags_if(LIBCXX_SYSROOT "--sysroot ${LIBCXX_SYSROOT}")
+if (APPLE)
+ add_flags_if(LIBCXX_SYSROOT "-isysroot ${LIBCXX_SYSROOT}")
+else
+ add_flags_if(LIBCXX_SYSROOT "--sysroot ${LIBCXX_SYSROOT}")
+endif()
add_flags_if(LIBCXX_GCC_TOOLCHAIN "-gcc-toolchain ${LIBCXX_GCC_TOOLCHAIN}")
# Warning flags ===============================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12644.34067.patch
Type: text/x-patch
Size: 712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150904/094305aa/attachment.bin>
More information about the cfe-commits
mailing list