[PATCH] D34910: Make LLVM_TARGETS_TO_BUILD=all build all targets

Richard Smith - zygoloid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 14:23:24 PDT 2017


rsmith created this revision.
Herald added subscribers: aheejin, mgorny, dschuff, sanjoy, jfb.

For LLVM development, we want a mode that builds everything; this is what the buildbots that say "all targets" should be testing. (All code in tree should build and pass its tests, even if it's an experimental target.) However, `LLVM_TARGETS_TO_BUILD=all` currently (surprisingly) only builds non-experimental targets. (Additional targets can be specified via `LLVM_EXPERIMENTAL_TARGETS_TO_BUILD`, which confusingly is just a list of more targets to build in addition to those in `LLVM_TARGETS_TO_BUILD`.)

This patch addresses this as follows:

- `LLVM_TARGETS_TO_BUILD=all` builds all targets
- A new value, `LLVM_TARGETS_TO_BUILD=stable`, builds only non-experimental targets
- The default for `LLVM_TARGETS_TO_BUILD` is changed from `all` to `stable`.

I've left `LLVM_EXPERIMENTAL_TARGETS_TO_BUILD` alone for now. I think it'd make more sense to be able to specify something like `LLVM_TARGETS_TO_BUILD=stable;WebAssembly` to add experimental targets to the stable targets list, but I don't see a reason to couple such a change to this change.


Repository:
  rL LLVM

https://reviews.llvm.org/D34910

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -310,7 +310,7 @@
 set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples)
 set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include)
 
-set(LLVM_ALL_TARGETS
+set(LLVM_STABLE_TARGETS
   AArch64
   AMDGPU
   ARM
@@ -328,11 +328,18 @@
   XCore
   )
 
+set(LLVM_ALL_TARGETS
+  ${LLVM_STABLE_TARGETS}
+  AVR
+  Nios2
+  WebAssembly
+  )
+
 # List of targets with JIT support:
 set(LLVM_TARGETS_WITH_JIT X86 PowerPC AArch64 ARM Mips SystemZ)
 
-set(LLVM_TARGETS_TO_BUILD "all"
-    CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
+set(LLVM_TARGETS_TO_BUILD "stable"
+    CACHE STRING "Semicolon-separated list of targets to build, or \"stable\", or \"all\".")
 
 set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ""
   CACHE STRING "Semicolon-separated list of experimental targets to build.")
@@ -365,7 +372,9 @@
 
 option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." ON)
 
-if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
+if( LLVM_TARGETS_TO_BUILD STREQUAL "stable" )
+  set( LLVM_TARGETS_TO_BUILD ${LLVM_STABLE_TARGETS} )
+elseif( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
   set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} )
 endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34910.104932.patch
Type: text/x-patch
Size: 1301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170630/e0827ecf/attachment.bin>


More information about the llvm-commits mailing list