This is an archive of the discontinued LLVM Phabricator instance.

Document LLVM_ENABLE_RUNTIMES
ClosedPublic

Authored by sylvestre.ledru on Aug 29 2021, 7:55 AM.

Diff Detail

Event Timeline

sylvestre.ledru requested review of this revision.Aug 29 2021, 7:55 AM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay added inline comments.Aug 29 2021, 9:06 AM
llvm/docs/CMake.rst
480
484

Worth mentioning that the list should not duplicate with LLVM_ENABLE_PROJECTS.

beanz added a comment.Aug 29 2021, 9:34 AM

Probably also worth noting it builds the builtins separately from the other runtimes to preserve correct dependency ordering.

Probably also worth noting it builds the builtins separately from the other runtimes to preserve correct dependency ordering.

Not sure what you mean here? Do you have an example?

llvm/docs/CMake.rst
480

oups

Take in account the comments

Not sure what you mean here? Do you have an example?

The goal of the runtimes build initially was to preserve correct dependency ordering when building. You need the just-built clang to build the builtins libraries, and you need the builtins libraries before you can build any fully linked dynamic libraries or executables. So when you use the runtimes build the build ordering is clang -> compiler-rt builtins only -> everything else.

Not sure what you mean here? Do you have an example?

The goal of the runtimes build initially was to preserve correct dependency ordering when building. You need the just-built clang to build the builtins libraries, and you need the builtins libraries before you can build any fully linked dynamic libraries or executables. So when you use the runtimes build the build ordering is clang -> compiler-rt builtins only -> everything else.

OpenMP also relies on the just build clang to create the (GPU) device runtimes. That is why our build with offloading support is based on the runtimes and not project.

phosek added inline comments.Aug 29 2021, 1:08 PM
llvm/docs/CMake.rst
487

LLVM libc is also supported, see https://github.com/llvm/llvm-project/blob/9f7873784dcce4177a759fc657b267d2f189bcf0/runtimes/CMakeLists.txt#L5

You can also use LLVM_ENABLE_RUNTIMES=all to build all supported runtimes.

Add libc to the list + document =all

phosek accepted this revision.Aug 31 2021, 5:43 PM

LGTM

This revision is now accepted and ready to land.Aug 31 2021, 5:43 PM
MaskRay accepted this revision.Aug 31 2021, 6:25 PM

Looks great!

This revision was automatically updated to reflect the committed changes.
tambre added a subscriber: tambre.Sep 1 2021, 12:55 AM
tambre added inline comments.
llvm/docs/CMake.rst
481

This sentence doesn't make much sense.

485

Probably worth wording more strongly and without it being a sidenote.

486

The full list of what? Not the defaults, so probably worth explicitly clarifying that these are possible values.