mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
CMake: make LLVM_OPTIMIZED_TABLEGEN friendly with LLVM_EXTERNAL_CLANG_SOURCE_DIR
This is need because of clang-tblgen Differential Revision: https://reviews.llvm.org/D26483 llvm-svn: 286560
This commit is contained in:
parent
13a1ee50ea
commit
4ae83cd009
@ -41,10 +41,15 @@ function(llvm_create_cross_target_internal target_name toolchain buildtype)
|
||||
if (buildtype)
|
||||
set(build_type_flags "-DCMAKE_BUILD_TYPE=${buildtype}")
|
||||
endif()
|
||||
if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
|
||||
# Propagate LLVM_EXTERNAL_CLANG_SOURCE_DIR so that clang-tblgen can be built
|
||||
set(external_clang_dir "-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=${LLVM_EXTERNAL_CLANG_SOURCE_DIR}")
|
||||
endif()
|
||||
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}
|
||||
-DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
|
||||
${external_clang_dir}
|
||||
WORKING_DIRECTORY ${LLVM_${target_name}_BUILD} )
|
||||
endif(NOT IS_DIRECTORY ${LLVM_${target_name}_BUILD})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user