This is an archive of the discontinued LLVM Phabricator instance.

[runtimes] Create check- targets for LLVM_RUNTIME_DISTRIBUTION_COMPONENTS
ClosedPublic

Authored by smeenai on Nov 29 2022, 5:47 PM.

Details

Summary

The sub-component check targets won't be automatically created until the
runtime configurations have run (and the main LLVM configure has rerun
afterwards). Work around this by creating check- targets for components
in LLVM_RUNTIME_DISTRIBUTION_COMPONENTS as well (and making sure they
get the proper test dependencies).

Diff Detail

Event Timeline

smeenai created this revision.Nov 29 2022, 5:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2022, 5:47 PM
smeenai requested review of this revision.Nov 29 2022, 5:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2022, 5:47 PM
phosek accepted this revision.Nov 29 2022, 10:46 PM

I've been thinking about how to better handle this case, that is to avoid having to run runtime configurations rerun the LLVM configuration. A possible solution would be to move the handling of compiler-rt runtimes to the runtimes build, that is instead of treating compiler-rt as a monolith, we would treat it as a collection of runtimes akin to libunwind, libc++abi or libc++ which would let you do LLVM_ENABLE_RUNTIMES=libunwind;libc++abi;libc++;asan. There is more cleanup needed, and we would also need to deprecate support for LLVM_ENABLE_PROJECTS=compiler-rt first, but I was wondering if you had any thoughts on the idea?

This revision is now accepted and ready to land.Nov 29 2022, 10:46 PM

I think that'd be pretty nice. Right now there's a bunch of different and inconsistent ways to control which parts of compiler-rt you build (e.g. the sanitizers have COMPILER_RT_SANITIZERS_TO_BUILD, but then things like XRay and libfuzzer have dedicated COMPILER_RT_BUILD_* variables), and it'd be great to have a consistent interface instead. I know @compnerd and some others have been interested in reorganizing compiler-rt, and this could be part of that.