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

Richard Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 11:47:32 PDT 2017


On 21 July 2017 at 16:20, Justin Bogner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Richard Smith - zygoloid via Phabricator via llvm-commits
> <llvm-commits at lists.llvm.org> writes:
> > 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`.
>
> Changing defaults doesn't really work in cmake - unless you explicitly
> specify a variable when reconfiguring the previous cached value won't be
> scrubbed even if it was the default.
>
> This change as is will effectively enable building all of the
> experimental targets in everyone's incremental build trees.


Is there a way to work around that? Ideally we would want to inspect the
old value and reinterpret it in the new model.


> > 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()
> >
> >
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170815/c73835e2/attachment.html>


More information about the llvm-commits mailing list