[PATCH] [CMake] Fix NATIVE configuration in cross-compilation
Akihiko Odaki via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 18 07:49:13 PDT 2016
This unset CC, CXX and ASM, which are set for target, before calling
CMake to configure for NATIVE.
---
cmake/modules/CrossCompile.cmake | 3 +++
1 file changed, 3 insertions(+)
diff --git a/cmake/modules/CrossCompile.cmake b/cmake/modules/CrossCompile.cmake
index 9c598a6..a20c5caa 100644
--- a/cmake/modules/CrossCompile.cmake
+++ b/cmake/modules/CrossCompile.cmake
@@ -41,6 +41,9 @@ function(llvm_create_cross_target_internal target_name toolchain buildtype)
if (buildtype)
set(build_type_flags "-DCMAKE_BUILD_TYPE=${buildtype}")
endif()
+ unset(ENV{CC})
+ unset(ENV{CXX})
+ unset(ENV{ASM})
execute_process(COMMAND ${CMAKE_COMMAND} ${build_type_flags}
-G "${CMAKE_GENERATOR}" -DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS_TO_BUILD}
${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
--
2.9.3
More information about the llvm-commits
mailing list