-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Deprecate the use of LLVM_ENABLE_PROJECTS
for openmp
#124014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-openmp Author: Petr Hosek (petrhosek)
We should deprecate the use of `LLVM_ENABLE_PROJECTS` for openmp in favor of `LLVM_ENABLE_RUNTIMES` which would greatly simplify the build and allow improvements that are currently not possible.
|
Speaking as an end user of LLVM, changing to the runtimes method would be a quality of life regression.
Maybe there has been some work in the area to mitigate these points? It has been a couple of years since I last experimented with both methods and never had a reason to come back to re-evaluate this choice. |
One issue I've had is that the
Can you expand on this?
You should be able to pass some arguments like I think I really need to write some documentation on how to use the offloading infrastructure for things like multilibs, cross-compiling, passing arguments to the runtimes job, etc. |
I think a lot of uses in the openmp community, especially those only care about One of the biggest disadvantages is, we now have to use very tedious and complicated approach to pass CMake arguments to the runtime build, and it seems like (if I use it correctly) that there is no way to set some CMake arguments for a certain runtime. For example, when I was working on openmp, I typically build release LLVM with debug openmp. It is still doable but I need to use Another inconvenience is the compile database, even though @jhuber6 made some efforts in the past, and that was reverted. |
I can remember that we've worked together on quite a few issues that I've reported in that time frame (2022) where that exact question came up in #55446 (comment)
And while trying it out, OpenMP broke way too often using that method. Hence I quickly went back to the proven method to save me some time and headaches. :) I also got this comment in which doesn't provide confidence for power users like me that want to use LTO (at least on the other parts that work fine with it).
That particular issue (#64217) is also still unresolved to this date.
As these arguments are also not part of any default distribution builds and the docs were generally not as detailed (especially the OpenMP docs at that time), this would indeed need some documentation. A way to exclude LTO only for openmp (if neccessary) would be great to get more fine grained control. |
It's still there, I haven't noticed any problems. |
I think there's some confusion between the runtimes build and bootstrapping build. The runtimes build (rooted at The bootstrapping build (rooted at You'd use libc++ which has deprecated the LLVM build in favor of runtimes build some time ago has great documentation with more details at https://libcxx.llvm.org/VendorDocumentation.html If you're wondering why we're trying to deprecate the use of LLVM build (that is LLVM build sets flags that are actually undesirable for runtime libraries; we're often working around it inside each runtime, but that only makes everything more complicated. Having a separate build for runtime libraries lets us sets the right flags without having to fight the LLVM build. |
We plan to make this a hard error in the LLVM 21 release. Link llvm#124014
No, I was not speaking of a bootstrap build. To clarify, these are my current LLVM cmake options:
The only difference was adding a line for "-DLLVM_ENABLE_RUNTIMES=openmp;compiler-rt" and deleting openmp and compiler-rt from the Projects line.
Thank you for the detailed clarification and for explaining the distinction between the runtimes build and bootstrapping. I appreciate the context around why the LLVM build ( To ensure a smooth transition for users like myself, could you elaborate on how to address the historical pain points? Specifically:
If the runtimes build now offers greater reliability and flexibility while avoiding the technical debt of the LLVM build’s workarounds, I’m open to adopting it. However, clear migration guidance (e.g., concrete examples for OpenMP, handling cross-compilation, or LTO configurations) would help users like myself transition confidently. The libc++ documentation is a great reference—would similar guidelines be available for OpenMP or other runtimes? Lastly, is there testing/CI coverage to validate the robustness of the runtimes build with LTO and alternative linkers? This would alleviate concerns about build regressions from earlier experiences. Thanks again for your patience and insights! |
Summary: These are compiler runtimes are currently have weird support for projects / runtimes. We should depcrate this to where the only expected configuration is via a runtimes build. If the user wants a custom setup they can still use the standalone build. I remember there were some concerens around the OpenMP module file for `flang`. Were those resolved? Fixes: llvm#124014
Summary: These are compiler runtimes are currently have weird support for projects / runtimes. We should depcrate this to where the only expected configuration is via a runtimes build. If the user wants a custom setup they can still use the standalone build. I remember there were some concerens around the OpenMP module file for `flang`. Were those resolved? Fixes: #124014
Summary: These are compiler runtimes are currently have weird support for projects / runtimes. We should depcrate this to where the only expected configuration is via a runtimes build. If the user wants a custom setup they can still use the standalone build. I remember there were some concerens around the OpenMP module file for `flang`. Were those resolved? Fixes: llvm#124014
… (#136314) Summary: These are compiler runtimes are currently have weird support for projects / runtimes. We should depcrate this to where the only expected configuration is via a runtimes build. If the user wants a custom setup they can still use the standalone build. I remember there were some concerens around the OpenMP module file for `flang`. Were those resolved? Fixes: llvm/llvm-project#124014
Summary: These are compiler runtimes are currently have weird support for projects / runtimes. We should depcrate this to where the only expected configuration is via a runtimes build. If the user wants a custom setup they can still use the standalone build. I remember there were some concerens around the OpenMP module file for `flang`. Were those resolved? Fixes: llvm#124014
Summary: These are compiler runtimes are currently have weird support for projects / runtimes. We should depcrate this to where the only expected configuration is via a runtimes build. If the user wants a custom setup they can still use the standalone build. I remember there were some concerens around the OpenMP module file for `flang`. Were those resolved? Fixes: llvm#124014
Summary: These are compiler runtimes are currently have weird support for projects / runtimes. We should depcrate this to where the only expected configuration is via a runtimes build. If the user wants a custom setup they can still use the standalone build. I remember there were some concerens around the OpenMP module file for `flang`. Were those resolved? Fixes: llvm#124014
Summary: These are compiler runtimes are currently have weird support for projects / runtimes. We should depcrate this to where the only expected configuration is via a runtimes build. If the user wants a custom setup they can still use the standalone build. I remember there were some concerens around the OpenMP module file for `flang`. Were those resolved? Fixes: llvm#124014
We should deprecate the use of
LLVM_ENABLE_PROJECTS
for openmp in favor ofLLVM_ENABLE_RUNTIMES
which would greatly simplify the build and allow improvements that are currently not possible.The text was updated successfully, but these errors were encountered: