Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Sep 11, 2025

Summary:
Currently the runtimes builds works by creating separate CMake projects
that build the respetive runtime. Right now we have a separate handling
for the 'default' target and manually specific runtimes via the
-DLLVM_RUNTIME_TARGETS option.

This patch changes the behavior to put all runtimes through the
LLVM_RUNTIME_TARGETS pipeline. The old "default" argument is now a
shorthand for LLVM_DEFAULT_TARGET_TRIPLE and corresponds to a sane
default.

In practical terms, this means the old runtimes-bins directory will
now be runtimes-x86_64-unknown-linux-gnu-bins for the majority of
users. We will not have check-<name> targets, but I have made
a top-level target that invokes all of the enabled targets check lines
to keep this backward compatible. So ninja check-cxx will still work.

There's likely some edge cases I missed here, but it seems to work in
the typical case for me. We'll see what CI thinks of this.

@jhuber6 jhuber6 added llvm Umbrella label for LLVM issues cmake Build system in general and CMake in particular labels Sep 11, 2025
Summary:
Currently the runtimes builds works by creating separate CMake projects
that build the respetive runtime. Right now we have a separate handling
for the 'default' target and manually specific runtimes via the
`-DLLVM_RUNTIME_TARGETS` option.

This patch changes the behavior to put all runtimes through the
`LLVM_RUNTIME_TARGETS` pipeline. The old `"default"` argument is now a
shorthand for `LLVM_DEFAULT_TARGET_TRIPLE` and corresponds to a sane
default.

In practical terms, this means the old `runtimes-bins` directory will
now be `runtimes-x86_64-unknown-linux-gnu-bins` for the majority of
users. We will not have `check-<name>-<triple>` targets, but I have made
a top-level target that invokes all of the enabled targets check lines
to keep this backward compatible.

There's likely some edge cases I missed here, but it seems to work in
the typical case for me. We'll see what CI thinks of this.
@mgorny
Copy link
Member

mgorny commented Sep 13, 2025

Oh, that's llvm/runtimes and not top-level runtimes, so I guess it won't affect Gentoo.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Sep 13, 2025

Oh, that's llvm/runtimes and not top-level runtimes, so I guess it won't affect Gentoo.

Yes, ideally this change doesn't affect anyone that isn't depending on the name of directories in the build tree. Fundamentally I'm hoping to make our runtimes infrastructure more predictable by removing this weird disconnect we have between the generic and specific targets. More or less, this change is equivalent to the user putting -DRUNTIME_TARGETS=${LLVM_DEFAULT_TARGET_TRIPLE}. I want to keep the functionality of default because it's very important that things like cache files can target the user's default system.

I added the check targets to give an interface that looks the same as what we have now for the majority of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular llvm Umbrella label for LLVM issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants