This is an archive of the discontinued LLVM Phabricator instance.

[libc++][CI] Prepares building C++ modules.
ClosedPublic

Authored by Mordante on Mar 24 2023, 9:41 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rGa9ddb7724533: [libc++][CI] Prepares building C++ modules.
Summary

D144994 adds modules to libc++. In order to test them some newer and
additional tools are required.

CMake 3.26
This is in combination with Clang 16 or newer makes it possible to
conveniently build modules with CMake. Unfortunately CMake 3.26 in our
setup has an issue with unused linker flags. This causes libunwind not
to compile at all. D145596 contains a quick-fix which is in the module
patch. The patch D142957 and followups will contain a proper fix.
Therefore install CMake 3.26 in a separate location, allowing to test
the module patch in the CI.

Ninja 1.11
Building modules requires dynamic rules, which requires this version.
This is a CMake 3.26 requirement to use modules. Note that without using
modules CMake still accepts older Ninja versions.

clang-scan-deps (in the tools package)
This tool is used by CMake to get the module dependencies. Note
strictly this currently will only be used for Clang 16 and Clang 17.
Clang 15 and Clang 14 are not needed. They are installed to keep
updating to Clang 18 and later easier.
(In the future we might not test modular build with all Clang versions,
however at the moment the feature is still in development in both Clang
and libc++ so it would be good to detect regressions.)

Diff Detail

Event Timeline

Mordante created this revision.Mar 24 2023, 9:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 9:41 AM
Herald added a subscriber: arichardson. · View Herald Transcript
Mordante requested review of this revision.Mar 24 2023, 9:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 9:41 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Apr 11 2023, 8:51 AM
This revision is now accepted and ready to land.Apr 11 2023, 8:51 AM
This revision was landed with ongoing or failed builds.Apr 11 2023, 9:43 AM
This revision was automatically updated to reflect the committed changes.