[PATCH] D75676: [cmake] Pass test and doc options down to CrossCompile

Maciej Jesionowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 04:56:45 PST 2020


yavn created this revision.
yavn added a reviewer: chandlerc.
yavn created this object with visibility "All Users".
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
yavn added a comment.

Hi, additional explanation (as I didn't want it in the commit message):

I'd like to make a change that can be useful when sparsely checking out code just for build purposes. For example, I'd like to exclude the llvm/test directory from the checkout because it is quite big. The test directory is not used if LLVM_INCLUDE_TESTS is set to OFF, but the CrossCompile module didn't take that into account, generating an error at build generation time. This patch fixes that issue by forwarding the options.


If tests and docs were skipped at the top level, CrossCompile should not
attempt to use them. This will allow a more lightweight source checkout
that excludes the test directory.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75676

Files:
  llvm/cmake/modules/CrossCompile.cmake


Index: llvm/cmake/modules/CrossCompile.cmake
===================================================================
--- llvm/cmake/modules/CrossCompile.cmake
+++ llvm/cmake/modules/CrossCompile.cmake
@@ -79,6 +79,10 @@
         -DLLVM_EXTERNAL_PROJECTS="${llvm_external_projects_arg}"
         ${external_project_source_dirs}
         -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}"
+        -DLLVM_INCLUDE_DOCS="${LLVM_INCLUDE_DOCS}"
+        -DLLVM_INCLUDE_EXAMPLES="${LLVM_INCLUDE_EXAMPLES}"
+        -DLLVM_INCLUDE_GO_TESTS="${LLVM_INCLUDE_GO_TESTS}"
+        -DLLVM_INCLUDE_TESTS="${LLVM_INCLUDE_TESTS}"
         ${build_type_flags} ${linker_flag} ${external_clang_dir}
         ${ARGN}
     WORKING_DIRECTORY ${${project_name}_${target_name}_BUILD}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75676.248442.patch
Type: text/x-patch
Size: 785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200305/03a66aea/attachment.bin>


More information about the llvm-commits mailing list