[PATCH] D22415: Enable cross-compilation across architectures on android
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 10:40:17 PDT 2016
fjricci created this revision.
fjricci added reviewers: compnerd, beanz, tberghammer, srhines, danalbert.
fjricci added a subscriber: llvm-commits.
Herald added subscribers: danalbert, tberghammer.
This patch fixes cross-architecture compilation,
by allowing flags like -target and --sysroot to be set for
architecture testing and compilation.
https://reviews.llvm.org/D22415
Files:
cmake/base-config-ix.cmake
lib/builtins/CMakeLists.txt
Index: lib/builtins/CMakeLists.txt
===================================================================
--- lib/builtins/CMakeLists.txt
+++ lib/builtins/CMakeLists.txt
@@ -407,12 +407,11 @@
list(REMOVE_ITEM ${arch}_SOURCES ${_cname})
endif ()
endforeach ()
-
add_compiler_rt_runtime(clang_rt.builtins
STATIC
ARCHS ${arch}
SOURCES ${${arch}_SOURCES}
- CFLAGS ${maybe_stdc99}
+ CFLAGS ${maybe_stdc99} ${CMAKE_CFLAGS}
PARENT_TARGET builtins)
endif ()
endforeach ()
Index: cmake/base-config-ix.cmake
===================================================================
--- cmake/base-config-ix.cmake
+++ cmake/base-config-ix.cmake
@@ -113,6 +113,7 @@
# Generate the COMPILER_RT_SUPPORTED_ARCH list.
if(ANDROID)
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${CMAKE_CFLAGS}")
# Examine compiler output to determine target architecture.
detect_target_arch()
set(COMPILER_RT_OS_SUFFIX "-android")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22415.64163.patch
Type: text/x-patch
Size: 1144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160715/7568364a/attachment.bin>
More information about the llvm-commits
mailing list