This is an archive of the discontinued LLVM Phabricator instance.

Add enable_runtimes option to Clang builder
ClosedPublic

Authored by DavidSpickett on Sep 15 2022, 6:28 AM.

Details

Summary

...and set aarch64-full-2stage to "auto" meaning
that compiler-rt will go in RUNTIMES.

The option already exists in the functions below
this it just needed adding to the arguments.

This is the start of moving all the bots that use compiler-rt
and friends to using ENABLE_RUNTIMES rather than ENABLE_PROJECTS.

(https://discourse.llvm.org/t/should-buildbots-switch-to-enable-runtimes-instead-of-enable-projects-for-compiler-rt/65042)

Diff Detail

Event Timeline

DavidSpickett created this revision.Sep 15 2022, 6:28 AM
Herald added a project: Restricted Project. · View Herald Transcript
DavidSpickett requested review of this revision.Sep 15 2022, 6:28 AM

This requires https://reviews.llvm.org/D132438 to be relanded in some form. I tested the build with that patch applied.

Locally the build was fine but I will move the bot to silent before landing this to make handling any issues easier.

gkistanova requested changes to this revision.Dec 14 2022, 11:27 PM

Hello David,

You have figured out that LLVMBuildFactoryalready supports proper handling of runtime projects, as described at https://github.com/llvm/llvm-zorg/blob/main/zorg/buildbot/process/factory.py#L24. Having enable_runtimes default to None and passing it through to LLVMBuildFactory is the right way to go.

The patch looks good in general, with a few issues to fix - please see my comments inline.

This patch changes the behavior of existing builders which use the ClangBuilder.getClangCMakeBuildFactory, though. Did you do an impact analyses by any chance? Is any of the existing builder affected?

buildbot/osuosl/master/config/builders.py
470

Don't you want to skip the enable_runtimes arg and let the default do the trick?

zorg/buildbot/builders/ClangBuilder.py
169–171

Missing comma at the and of this line?

185–186

Missing comma at the and of this line?

275–276

Missing comma before enable_runtimes param?

This revision now requires changes to proceed.Dec 14 2022, 11:27 PM
DavidSpickett marked 3 inline comments as done.Dec 15 2022, 2:33 AM

This patch changes the behavior of existing builders which use the ClangBuilder.getClangCMakeBuildFactory, though. Did you do an impact analyses by any chance? Is any of the existing builder affected?

I don't think that it does, perhaps I am mistaken. My intent is that only clang-aarch64-full-2stage would change.

buildbot/osuosl/master/config/builders.py
470

The default enable_runtimes to getClangCMakeBuildFactory is None.
That calls _getClangCMakeBuildFactory passing on that value.
That creates an LLVMBuildFactory passing on None, that then does this check:

enable_runtimes = kwargs.pop('enable_runtimes', None)
# If specified, we either got a givem list of
# enabled runtimes, or "auto", or "all".

if enable_runtimes is None:
    # For the backward compatibility, we do not use
    # enable_runtimes unless it is requested explicitly.
    self.enable_runtimes = frozenset([])

Prior to this change, no value is passed down and we use LLVMBuildFactory's default, which is None as shown in the code above.

So existing builders were ending up with None and now they just do that by passing down a None from higher up. This one bot then overrides that with "auto" to opt into the runtimes build.

Perhaps you meant that the default to getClangCMakeBuildFactory could be changed to "auto" and yes, eventually I'd like that to happen. For now, as you pointed out, we need to limit the impact.

This first builder is one we (Linaro) control. Once that's working I'll work on our other bots and reach out to the other owners to get them switched over / explicitly marked as not wanting to use the runtimes build.

Add missing commas.

And somehow Arc included the entire world in that last update, will fix.

Attempt to fix the diff.

DavidSpickett removed reviewers: bollu, jdoerfert, sscalpone.

Update the diff the old fashioned way.

Apologies for the spam folks :)

This revision is now accepted and ready to land.Dec 15 2022, 4:20 PM
DavidSpickett closed this revision.Feb 20 2023, 8:35 AM
This revision was landed with ongoing or failed builds.Feb 20 2023, 8:39 AM