[PATCH] D26483: 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:37:36 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL286560: CMake: make LLVM_OPTIMIZED_TABLEGEN friendly with LLVM_EXTERNAL_CLANG_SOURCE_DIR (authored by mehdi_amini).

Changed prior to commit:
  https://reviews.llvm.org/D26483?vs=77427&id=77594#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26483

Files:
  llvm/trunk/cmake/modules/CrossCompile.cmake


Index: llvm/trunk/cmake/modules/CrossCompile.cmake
===================================================================
--- llvm/trunk/cmake/modules/CrossCompile.cmake
+++ llvm/trunk/cmake/modules/CrossCompile.cmake
@@ -41,10 +41,15 @@
     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})
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26483.77594.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161111/9355081f/attachment.bin>


More information about the llvm-commits mailing list