[PATCH] [libc++abi] Add support for cross compiling.
Dan Albert
danalbert at google.com
Wed Jan 14 18:29:45 PST 2015
Hi jroelofs, EricWF,
REPOSITORY
rL LLVM
http://reviews.llvm.org/D6991
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -133,6 +133,14 @@
"Specify path to libc++ includes." FORCE)
#===============================================================================
+# Cross compiling options
+#===============================================================================
+if(LIBCXXABI_CROSSCOMPILING)
+ option(LIBCXXABI_GCC_TOOLCHAIN "GCC toolchain for cross compiling.")
+ option(LIBCXXABI_SYSROOT "Sysroot for cross compiling.")
+endif()
+
+#===============================================================================
# Configure System
#===============================================================================
@@ -245,6 +253,12 @@
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
+append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_CROSSCOMPILING
+ "-target ${LIBCXXABI_TARGET_TRIPLE}")
+append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_GCC_TOOLCHAIN
+ "-gcc-toolchain ${LIBCXXABI_GCC_TOOLCHAIN}")
+append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_SYSROOT
+ "--sysroot ${LIBCXXABI_SYSROOT}")
string(REPLACE ";" " " LIBCXXABI_CXX_FLAGS "${LIBCXXABI_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXXABI_CXX_FLAGS}")
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6991.18207.patch
Type: text/x-patch
Size: 1285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150115/6d29bb72/attachment.bin>
More information about the cfe-commits
mailing list