mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[cmake] Move CMAKE_(C|CXX)_COMPILER variables before CROSS_TOOLCHAIN_FLAGS so
they can be overridden when cross compiling. Summary: Since CROSS_TOOLCHAN_FLAGS can set CMAKE_(C|CXX)_COMPILER variables, move the compiler variables up front so they can be overridden. This is a followup to https://reviews.llvm.org/D40229 committed in rL319620. Thanks to Pavel Labath for reporting this issue. Reviewers: labath, beanz Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D40896 llvm-svn: 319898
This commit is contained in:
parent
afc2ad760d
commit
53cb4a8f16
@ -32,10 +32,10 @@ function(llvm_create_cross_target_internal target_name toolchain buildtype)
|
||||
|
||||
add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
|
||||
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
|
||||
${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
|
||||
-DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
|
||||
-DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
|
||||
-DLLVM_TARGETS_TO_BUILD=Native
|
||||
${build_type_flags} ${linker_flag} ${external_clang_dir}
|
||||
WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}
|
||||
|
Loading…
Reference in New Issue
Block a user