[llvm] 4e1b890 - cmake fill `cmake_args` when cross-compiling external project with non-clang compiler
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 14:03:30 PDT 2022
Author: Alexander Smarus
Date: 2022-06-02T21:02:58Z
New Revision: 4e1b89064f62c9df012a5c390aec861368ae8112
URL: https://github.com/llvm/llvm-project/commit/4e1b89064f62c9df012a5c390aec861368ae8112
DIFF: https://github.com/llvm/llvm-project/commit/4e1b89064f62c9df012a5c390aec861368ae8112.diff
LOG: cmake fill `cmake_args` when cross-compiling external project with non-clang compiler
This makes it possible to crosscompile runtimes with cl.exe on Windows.
An external project is completely misconfigured otherwise because
cmake_args is set only for native builds or builds crosscompiled with
clang.
Differential Revision: https://reviews.llvm.org/D122578
Reviewed By: beanz, compnerd
Added:
Modified:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
index f99a50df22801..d2892df6b3409 100644
--- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -278,6 +278,8 @@ function(llvm_ExternalProject_Add name source_dir)
foreach(type ${flag_types})
list(APPEND cmake_args ${${type}_flag})
endforeach()
+ else()
+ set(cmake_args ${ARG_CMAKE_ARGS})
endif()
else()
set(llvm_config_path "$<TARGET_FILE:llvm-config>")
More information about the llvm-commits
mailing list