[llvm-dev] [PATCH] CrossCompile: Escape LLVM_TARGET variable properly

Ricardo Ribalda Delgado via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 14 04:45:15 PDT 2016

Without this patch, if the user provides a list of targets such as
-DLLVM_TARGETS_TO_BUILD=a,b the NATIVE cross compilation folder will
only contain target a, due to the way cmake parses variables.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
 cmake/modules/CrossCompile.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/modules/CrossCompile.cmake b/cmake/modules/CrossCompile.cmake
index 9c598a6a07b0..65f2e70626ba 100644
--- a/cmake/modules/CrossCompile.cmake
+++ b/cmake/modules/CrossCompile.cmake
@@ -42,7 +42,7 @@ function(llvm_create_cross_target_internal target_name toolchain buildtype)
       set(build_type_flags "-DCMAKE_BUILD_TYPE=${buildtype}")
     execute_process(COMMAND ${CMAKE_COMMAND} ${build_type_flags}
         ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
       WORKING_DIRECTORY ${LLVM_${target_name}_BUILD} )

More information about the llvm-dev mailing list