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

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 14:13:14 PDT 2017


Richard Smith <richard at metafoo.co.uk> writes:
> 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.

The only workarounds I can think of are:

1. Don't use `all` - if the old default value isn't an option we can
   tell that its out of date

2. Rename the variable and transfer the value over if the new one
   doesn't exist yet.

3. Add an extra variable as a sigil to say we've updated a tree.

I'm not a big fan of any of those - (1) is probably the best of them
since (2) messes with our build instructions and (3) would add some
meaningless junk variable that has to stay around forever. We could add
"everything" and "stable", treat "all" as "stable" and stop documenting
"all", I suppose.


More information about the llvm-commits mailing list