From: Chris Bieneman Date: Fri, 19 Apr 2019 20:08:55 +0000 (+0000) Subject: [CMake] Pass monorepo build settings in cross compile X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5631cdaf4ed5c7bd97b269ff50d7cdc2615f5744;p=llvm [CMake] Pass monorepo build settings in cross compile This allows the cross compiled build targets to configure the LLVM tools and sub-projects that are part of the main build. This is needed for generating native non llvm *-tablegen tools when cross compiling clang in the monorepo build environment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358779 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/CrossCompile.cmake b/cmake/modules/CrossCompile.cmake index d1996052a23..6d186de2724 100644 --- a/cmake/modules/CrossCompile.cmake +++ b/cmake/modules/CrossCompile.cmake @@ -54,6 +54,8 @@ function(llvm_create_cross_target_internal target_name toolchain buildtype) -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_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}" ${build_type_flags} ${linker_flag} ${external_clang_dir} WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}