[llvm] r358859 - [cmake] Fix bug in r358779 - [CMake] Pass monorepo build settings in cross compile
Don Hinton via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 21 12:20:13 PDT 2019
Author: dhinton
Date: Sun Apr 21 12:20:13 2019
New Revision: 358859
URL: http://llvm.org/viewvc/llvm-project?rev=358859&view=rev
Log:
[cmake] Fix bug in r358779 - [CMake] Pass monorepo build settings in cross compile
Escape semicolons in the targets list so that cmake doesn't expand
them to spaces.
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=358859&r1=358858&r2=358859&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CrossCompile.cmake (original)
+++ llvm/trunk/cmake/modules/CrossCompile.cmake Sun Apr 21 12:20:13 2019
@@ -45,6 +45,11 @@ function(llvm_create_cross_target_intern
string(REPLACE ";" "$<SEMICOLON>" experimental_targets_to_build_arg
"${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}")
+ string(REPLACE ";" "$<SEMICOLON>" llvm_enable_projects_arg
+ "${LLVM_ENABLE_PROJECTS}")
+ string(REPLACE ";" "$<SEMICOLON>" llvm_external_projects_arg
+ "${LLVM_EXTERNAL_PROJECTS}")
+
add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-DCMAKE_MAKE_PROGRAM="${CMAKE_MAKE_PROGRAM}"
@@ -54,8 +59,8 @@ function(llvm_create_cross_target_intern
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${experimental_targets_to_build_arg}"
-DLLVM_DEFAULT_TARGET_TRIPLE="${TARGET_TRIPLE}"
-DLLVM_TARGET_ARCH="${LLVM_TARGET_ARCH}"
- -DLLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS}"
- -DLLVM_EXTERNAL_PROJECTS="${LLVM_EXTERNAL_PROJECTS}"
+ -DLLVM_ENABLE_PROJECTS="${llvm_enable_projects_arg}"
+ -DLLVM_EXTERNAL_PROJECTS="${llvm_external_projects_arg}"
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}"
${build_type_flags} ${linker_flag} ${external_clang_dir}
WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}
More information about the llvm-commits
mailing list