[llvm] r286560 - CMake: make LLVM_OPTIMIZED_TABLEGEN friendly with LLVM_EXTERNAL_CLANG_SOURCE_DIR
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 20:27:59 PST 2016
Author: mehdi_amini
Date: Thu Nov 10 22:27:59 2016
New Revision: 286560
URL: http://llvm.org/viewvc/llvm-project?rev=286560&view=rev
Log:
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
Modified:
llvm/trunk/cmake/modules/CrossCompile.cmake
Modified: llvm/trunk/cmake/modules/CrossCompile.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CrossCompile.cmake?rev=286560&r1=286559&r2=286560&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CrossCompile.cmake (original)
+++ llvm/trunk/cmake/modules/CrossCompile.cmake Thu Nov 10 22:27:59 2016
@@ -41,10 +41,15 @@ function(llvm_create_cross_target_intern
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})
More information about the llvm-commits
mailing list