Page MenuHomePhabricator

[CMake] Support building crt with the bootstrapping build
AcceptedPublic

Authored by phosek on Oct 24 2022, 11:05 PM.

Details

Reviewers
smeenai
beanz
Summary

On platforms like Linux, we need to build crt prior building the rest of
compiler-rt. This change introduces support for building crt with the
bootstrapping build akin to builtins.

Diff Detail

Event Timeline

phosek created this revision.Oct 24 2022, 11:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 24 2022, 11:05 PM
Herald added a subscriber: abrachet. · View Herald Transcript
phosek requested review of this revision.Oct 24 2022, 11:05 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 24 2022, 11:05 PM

I might be missing it, but I don't see crt depending on builtins (or vice versa). If there is actually no dep, could we build them together in a single configure, instead of needing to add another one for crt? If there is a dep and I missed it, then this LGTM.

I might be missing it, but I don't see crt depending on builtins (or vice versa). If there is actually no dep, could we build them together in a single configure, instead of needing to add another one for crt? If there is a dep and I missed it, then this LGTM.

There is no dependency because crt and builtins aren't dependent on each other. We could build them in a single configure, but we would another top level CMakeLists.txt. Do you have any suggestions for where that should live?

smeenai accepted this revision.Nov 4 2022, 12:05 PM

I might be missing it, but I don't see crt depending on builtins (or vice versa). If there is actually no dep, could we build them together in a single configure, instead of needing to add another one for crt? If there is a dep and I missed it, then this LGTM.

There is no dependency because crt and builtins aren't dependent on each other. We could build them in a single configure, but we would another top level CMakeLists.txt. Do you have any suggestions for where that should live?

Sorry, this fell off my radar. This is fine as-is; avoiding the extra configure could potentially be nice for build times, but we can address that later if it's actually an issue. I don't have a great idea for the placement of the combined builtins+crt CMakeLists.

This revision is now accepted and ready to land.Nov 4 2022, 12:05 PM