llvm: optionally build compiler-rt, libcxx and libunwind as runtimes#32476
llvm: optionally build compiler-rt, libcxx and libunwind as runtimes#32476naromero77 merged 31 commits intospack:developfrom
Conversation
b82f8bb to
42d01d8
Compare
| variant( | ||
| "flang", | ||
| default=False, | ||
| when="@11: +clang", |
| default=True, | ||
| when="+clang", | ||
| description="Build the libcxxabi libunwind", | ||
| "libunwind", |
There was a problem hiding this comment.
If you want to add an alias with this name, do it, and we can deprecate the old one, but too many things rely on the variants of this package to do it without a deprecation period at this point.
There was a problem hiding this comment.
I am sorry. Is there a feature alias or should I simply add a new variant? Does it make much sense, given that the possible values of the variant change anyway from True/False to "none"/"project"/"runtime"? Regarding things that depend on this. Do you mean in the Spack repo? I think I have updated the corresponding packages that depend on llvm. Or do you mean that there are people who use develop in production and expect their configuration files to be compatible with it at all times? I personally dropped this idea 5 years ago.
I don't mind creating an alias, of course, I just want the variants to be consistent with the upstream names to make it easier to understand what is what. I would also replace omp with libompopenmp but didn't want to touch omp_debug and omp_tsan too.
There was a problem hiding this comment.
I mean in the spack repo and in other downstream package repos, we've had significant breakage and complaints from previous changes of variant names without a transition period, which is what I'm trying to avoid. The problem is actually the people that don't live on develop, they want a release with the variant marked as deprecated before it is removed in the following one, basically.
We do not currently have an alias feature, though supposedly that's in the works, it would be a separate variant, probably with a default dependent on the value of the existing one for now and set up such that they can't disagree. Annoying I know, but more kind to stable deployments.
| description="Build the libcxxabi libunwind", | ||
| "libunwind", | ||
| values=("none", "project", conditional("runtime", when="+clang @6:")), | ||
| default="runtime", |
There was a problem hiding this comment.
Is there ever a reason not to build it as a runtime in versions after it becomes safe to do so?
There was a problem hiding this comment.
Good question. Do you mean that we could have +libunwind (or even +internal_unwind) and decide on how to build the component based on the version we build and whether +clang is set? I thought of it and have to admit that I don't have bulletproof arguments against that.
However, I generally try not to limit the users if possible: if a package can be built in a certain configuration and its developers do not say "don't do that", I don't want to make the decision for the users. Also, llvm is heavily used as just a set of libraries (without clang) and the users might want them to be built with the same compiler they use to compile their projects.
There was a problem hiding this comment.
Two more things here:
- For me,
+clang libunwind=runtimeand~clang libunwind=projectread better then just+clangand~clangbecause I would have to readpackage.pyto understand whether the library that I need is built with the compiler that I want to use. - If we are talking about some backwards compatibility, all packages that had
llvm+internal_unwind(llvm~internal_unwind) as a dependency can simply go forllvm libunwind=project(llvm libunwind=none) and don't be afraid that suddenlylibunwindis built as a runtime.
There was a problem hiding this comment.
I think that I follow the variant name change. Its just for consistently with upstream and I think this is a win for us.
| default=True, | ||
| when="+clang @12:", | ||
| description="Build OpenMP runtime via ENABLE_RUNTIME by just-built Clang", | ||
| "omp", |
There was a problem hiding this comment.
Same variant issue as above, name needs to have a deprecation period.
There was a problem hiding this comment.
Ok. I will then go further and make it openmp, openmp_tsan and openmp_debug.
| conflicts("+flang", when="@:10") | ||
| conflicts("+flang", when="~clang") | ||
| conflicts("+lldb", when="~clang") | ||
| conflicts("+z3", when="@:7") | ||
| conflicts("+z3", when="~clang") |
There was a problem hiding this comment.
Ah, got it, I can resolve the other comments, but I would greatly prefer that these be grouped with the appropriate variant() directives so they're easier to take in as a whole.
There was a problem hiding this comment.
I agree. It's just for simple packages we usually have variants, then depends_ons and then conflicts, which is not necessary in general, as far as I know, and makes the code significantly less readable in this case.
| # libcxx=project imposes compiler conflicts | ||
| # see https://libcxx.llvm.org/#platform-and-compiler-support for the latest release | ||
| # and https://github.com/llvm/www-releases for older releases | ||
| with when("libcxx=project"): |
There was a problem hiding this comment.
@tgamblin we need a way to deal with useful things like this for the caching stuff, all the inputs are literal, but the directive calls receive variables. Maybe something we could explore https://pypi.org/project/pystarlark/ for, make an invocation of pyskylark with a literal containing directives behave like invocations of those literals? Or, easier, make it so we can import directives from a flat yaml or json value or better dhall or cue document or something? We need to be able to do this stuff, but not being able to cache llvm (given its ubiquity and complexity) would be really unfortunate. =/
| # sys/ustat.h has been removed in favour of statfs from glibc-2.28. Use fixed sizes: | ||
| patch("llvm5-sanitizer-ustat.patch", when="@4:6.0.0+compiler-rt") | ||
|
|
||
| # Fix lld templates: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230463 | ||
| patch("llvm4-lld-ELF-Symbols.patch", when="@4+lld%clang@6:") | ||
| patch("llvm5-lld-ELF-Symbols.patch", when="@5+lld%clang@7:") | ||
|
|
||
| # Fix missing std:size_t in 'llvm@4:5' when built with '%clang@7:' | ||
| patch("xray_buffer_queue-cstddef.patch", when="@4:5+compiler-rt%clang@7:") | ||
| # fix missing ::size_t in 'llvm@4:5' | ||
| # see comments in the patch file | ||
| patch( | ||
| "xray_buffer_queue-cstddef.patch", | ||
| # we do not cover compiler-rt=runtime because it is not supported when @:5 | ||
| when="@4:5 compiler-rt=project", | ||
| ) | ||
|
|
||
| # https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce | ||
| patch("sanitizer-ipc_perm_mode.patch", when="@5:7+compiler-rt%clang@11:") | ||
| patch("sanitizer-ipc_perm_mode.patch", when="@5:9+compiler-rt%gcc@9:") | ||
| # fix building of older versions of llvm with newer versions of glibc | ||
| for compiler_rt_as in ["project", "runtime"]: | ||
| with when("compiler-rt={0}".format(compiler_rt_as)): | ||
| # sys/ustat.h has been removed in favour of statfs from glibc-2.28 | ||
| # see https://reviews.llvm.org/D47281 | ||
| patch( | ||
| "https://github.com/llvm/llvm-project/commit/383fe5c8668f63ef21c646b43f48da9fa41aa100.patch?full_index=1", | ||
| sha256="66f01ac1769a6815aba09d6f4347ac1744f77f82ec9578a1158b24daca7a89e6", | ||
| when="@4:6.0.0", | ||
| ) | ||
| # fix sanitizer-common build with glibc 2.31 | ||
| # see https://reviews.llvm.org/D70662 | ||
| patch("sanitizer-ipc_perm_mode.patch", when="@5:9") | ||
| del compiler_rt_as |
There was a problem hiding this comment.
Is the result of this that we get the same patches in the same cases? It looks like it but I haven't checked through the llvm commit output to be completely sure.
There was a problem hiding this comment.
I guess I should give a summary of the patch modifications:
see #32476 (comment)
| runtimes.extend(["libcxx", "libcxxabi"]) | ||
| else: | ||
| projects.extend(["libcxx", "libcxxabi"]) | ||
| if "compiler-rt=runtime" in spec: |
There was a problem hiding this comment.
If we can standardize on this style, it might be nice to loop over keys in the spec with a given property, and add them to runtimes or projects based on their value. Loving this refactor overall if we can make it fly. 👍
There was a problem hiding this comment.
Could you, please, give an example of how to "loop over keys in the spec with a given property"? I thought of refactoring it but the problem was that the variant omp adds openmp and the variant libcxx adds libcxx and libcxxabi. Currently we'd have something like:
for var, params in {
"omp": ["openmp"],
"libunwind": ["libunwind"],
"libcxx": ["libcxx", "libcxxabi"],
"compiler-rt": ["compiler-rt"],
}.items():
val = spec.variants[var].value
if val == "project":
projects.extend(params)
elif val == "runtime":
runtimes.extend(params)Does it really make sense?
|
Also, if you'd like to be a maintainer, I think @haampie and I would welcome the help. There may be some significant changes coming down soon to try and unify the llvm building support across more parts of spack, and having another pair of eyes would be fantastic. |
d0592b4 to
31f238e
Compare
|
Summary of the patch modifications:
There seem to be no patches that could be fetched from a reliable source anymore. |
|
@trws I have also renamed variants
UPD: The following does not seem to work either: variant(
"libcxx",
values=disjoint_sets(
# Deprecated values:
(True, False),
# New values:
("none",),
("project", conditional("runtime", when="+clang @6:")),
).prohibit_empty_set().with_default("runtime"), ... |
|
@haampie, how do you feel about this? I'd like to take it, but am still on the fence on how we should deal with variant breakage. For packages in tree they're all fixed here at least. |
…euse 'llvm-gcc11.patch'
…r constraints for them
naromero77
left a comment
There was a problem hiding this comment.
@trws Do you have any additional comments about this PR?
@skosukhin Could you please test a couple of configuration with and with OpenMP target offload on your local desktop?
|
@spackbot help |
|
You can interact with me in many ways!
I'll also help to label your pull request and assign reviewers! |
|
@spackbot re-run pipeline |
|
I'm sorry, gitlab does not have your latest revision yet, I can't run that pipeline for you right now. One likely possibility is that your PR pipeline has been temporarily deferred, in which case, it is awaiting a Please check the gitlab commit status message to see if more information is available. DetailsUnexpected response from gitlab: {'message': '404 Commit Not Found'} |
…pack#32476) * llvm: replace +omp_as_runtime with omp=runtime * llvm: fetch 'libomp-libflags-as-list.patch' from upstream repo * llvm: replace 'llvm14-hwloc-ompd.patch' with the official fix from upstream repo * llvm: fix-up for the black reformatting * llvm: fetch 'constexpr_longdouble.patch' from upstream repo * llvm: optionally build libcxx as a runtime * llvm: fetch 'llvm5-sanitizer-ustat.patch' from upstream repo * llvm: update 'sanitizer-ipc_perm_mode.patch' * llvm: refactor compiler conflicts when libcxx=project * llvm: fetch 'llvm_python_path.patch' from upstream repo * llvm: update comments and condition for 'xray_buffer_queue-cstddef.patch' * llvm: optionally build compiler-rt as a runtime * llvm: fetch 'lldb_external_ncurses-10.patch' from upstream repo * llvm: fetch 'llvm_py37.patch' from upstream repo * llvm: rename variant 'internal_unwind' to 'libunwind' * llvm: optionally build libunwind as a runtime * llvm: extend the list of maintainers * llvm: allow for explicit '~clang~flang~libomptarget~lldb~omp_debug~z3' * llvm: fetch 'llvm5-lld-ELF-Symbols.patch' from FreeBSD port repo * llvm: fetch most of 'missing-includes.patch' from upstream repo and reuse 'llvm-gcc11.patch' * llvm: regroup patches for missing include directives and drop compiler constraints for them * llvm: fetch 'llvm-gcc11.patch' from upstream repo * llvm: fetch 'no_cyclades.patch' from upstream repo * llvm: update comments and condition for 'no_cyclades9.patch' * llvm: rename variant 'omp' to 'openmp' * llvm: constrain and rename variant 'omp_tsan' to 'libomp_tsan' * llvm: rename variant 'omp_debug' to 'libomptarget_debug' * llvm: do not apply same patch twice * llvm: constrain and document the '*-thread.patch' patches * llvm: document the '~lld+libomptarget' conflict * llvm: update comments for the 'D133513.diff' patch
…pack#32476) * llvm: replace +omp_as_runtime with omp=runtime * llvm: fetch 'libomp-libflags-as-list.patch' from upstream repo * llvm: replace 'llvm14-hwloc-ompd.patch' with the official fix from upstream repo * llvm: fix-up for the black reformatting * llvm: fetch 'constexpr_longdouble.patch' from upstream repo * llvm: optionally build libcxx as a runtime * llvm: fetch 'llvm5-sanitizer-ustat.patch' from upstream repo * llvm: update 'sanitizer-ipc_perm_mode.patch' * llvm: refactor compiler conflicts when libcxx=project * llvm: fetch 'llvm_python_path.patch' from upstream repo * llvm: update comments and condition for 'xray_buffer_queue-cstddef.patch' * llvm: optionally build compiler-rt as a runtime * llvm: fetch 'lldb_external_ncurses-10.patch' from upstream repo * llvm: fetch 'llvm_py37.patch' from upstream repo * llvm: rename variant 'internal_unwind' to 'libunwind' * llvm: optionally build libunwind as a runtime * llvm: extend the list of maintainers * llvm: allow for explicit '~clang~flang~libomptarget~lldb~omp_debug~z3' * llvm: fetch 'llvm5-lld-ELF-Symbols.patch' from FreeBSD port repo * llvm: fetch most of 'missing-includes.patch' from upstream repo and reuse 'llvm-gcc11.patch' * llvm: regroup patches for missing include directives and drop compiler constraints for them * llvm: fetch 'llvm-gcc11.patch' from upstream repo * llvm: fetch 'no_cyclades.patch' from upstream repo * llvm: update comments and condition for 'no_cyclades9.patch' * llvm: rename variant 'omp' to 'openmp' * llvm: constrain and rename variant 'omp_tsan' to 'libomp_tsan' * llvm: rename variant 'omp_debug' to 'libomptarget_debug' * llvm: do not apply same patch twice * llvm: constrain and document the '*-thread.patch' patches * llvm: document the '~lld+libomptarget' conflict * llvm: update comments for the 'D133513.diff' patch
…pack#32476) * llvm: replace +omp_as_runtime with omp=runtime * llvm: fetch 'libomp-libflags-as-list.patch' from upstream repo * llvm: replace 'llvm14-hwloc-ompd.patch' with the official fix from upstream repo * llvm: fix-up for the black reformatting * llvm: fetch 'constexpr_longdouble.patch' from upstream repo * llvm: optionally build libcxx as a runtime * llvm: fetch 'llvm5-sanitizer-ustat.patch' from upstream repo * llvm: update 'sanitizer-ipc_perm_mode.patch' * llvm: refactor compiler conflicts when libcxx=project * llvm: fetch 'llvm_python_path.patch' from upstream repo * llvm: update comments and condition for 'xray_buffer_queue-cstddef.patch' * llvm: optionally build compiler-rt as a runtime * llvm: fetch 'lldb_external_ncurses-10.patch' from upstream repo * llvm: fetch 'llvm_py37.patch' from upstream repo * llvm: rename variant 'internal_unwind' to 'libunwind' * llvm: optionally build libunwind as a runtime * llvm: extend the list of maintainers * llvm: allow for explicit '~clang~flang~libomptarget~lldb~omp_debug~z3' * llvm: fetch 'llvm5-lld-ELF-Symbols.patch' from FreeBSD port repo * llvm: fetch most of 'missing-includes.patch' from upstream repo and reuse 'llvm-gcc11.patch' * llvm: regroup patches for missing include directives and drop compiler constraints for them * llvm: fetch 'llvm-gcc11.patch' from upstream repo * llvm: fetch 'no_cyclades.patch' from upstream repo * llvm: update comments and condition for 'no_cyclades9.patch' * llvm: rename variant 'omp' to 'openmp' * llvm: constrain and rename variant 'omp_tsan' to 'libomp_tsan' * llvm: rename variant 'omp_debug' to 'libomptarget_debug' * llvm: do not apply same patch twice * llvm: constrain and document the '*-thread.patch' patches * llvm: document the '~lld+libomptarget' conflict * llvm: update comments for the 'D133513.diff' patch
…pack#32476) * llvm: replace +omp_as_runtime with omp=runtime * llvm: fetch 'libomp-libflags-as-list.patch' from upstream repo * llvm: replace 'llvm14-hwloc-ompd.patch' with the official fix from upstream repo * llvm: fix-up for the black reformatting * llvm: fetch 'constexpr_longdouble.patch' from upstream repo * llvm: optionally build libcxx as a runtime * llvm: fetch 'llvm5-sanitizer-ustat.patch' from upstream repo * llvm: update 'sanitizer-ipc_perm_mode.patch' * llvm: refactor compiler conflicts when libcxx=project * llvm: fetch 'llvm_python_path.patch' from upstream repo * llvm: update comments and condition for 'xray_buffer_queue-cstddef.patch' * llvm: optionally build compiler-rt as a runtime * llvm: fetch 'lldb_external_ncurses-10.patch' from upstream repo * llvm: fetch 'llvm_py37.patch' from upstream repo * llvm: rename variant 'internal_unwind' to 'libunwind' * llvm: optionally build libunwind as a runtime * llvm: extend the list of maintainers * llvm: allow for explicit '~clang~flang~libomptarget~lldb~omp_debug~z3' * llvm: fetch 'llvm5-lld-ELF-Symbols.patch' from FreeBSD port repo * llvm: fetch most of 'missing-includes.patch' from upstream repo and reuse 'llvm-gcc11.patch' * llvm: regroup patches for missing include directives and drop compiler constraints for them * llvm: fetch 'llvm-gcc11.patch' from upstream repo * llvm: fetch 'no_cyclades.patch' from upstream repo * llvm: update comments and condition for 'no_cyclades9.patch' * llvm: rename variant 'omp' to 'openmp' * llvm: constrain and rename variant 'omp_tsan' to 'libomp_tsan' * llvm: rename variant 'omp_debug' to 'libomptarget_debug' * llvm: do not apply same patch twice * llvm: constrain and document the '*-thread.patch' patches * llvm: document the '~lld+libomptarget' conflict * llvm: update comments for the 'D133513.diff' patch
…pack#32476) * llvm: replace +omp_as_runtime with omp=runtime * llvm: fetch 'libomp-libflags-as-list.patch' from upstream repo * llvm: replace 'llvm14-hwloc-ompd.patch' with the official fix from upstream repo * llvm: fix-up for the black reformatting * llvm: fetch 'constexpr_longdouble.patch' from upstream repo * llvm: optionally build libcxx as a runtime * llvm: fetch 'llvm5-sanitizer-ustat.patch' from upstream repo * llvm: update 'sanitizer-ipc_perm_mode.patch' * llvm: refactor compiler conflicts when libcxx=project * llvm: fetch 'llvm_python_path.patch' from upstream repo * llvm: update comments and condition for 'xray_buffer_queue-cstddef.patch' * llvm: optionally build compiler-rt as a runtime * llvm: fetch 'lldb_external_ncurses-10.patch' from upstream repo * llvm: fetch 'llvm_py37.patch' from upstream repo * llvm: rename variant 'internal_unwind' to 'libunwind' * llvm: optionally build libunwind as a runtime * llvm: extend the list of maintainers * llvm: allow for explicit '~clang~flang~libomptarget~lldb~omp_debug~z3' * llvm: fetch 'llvm5-lld-ELF-Symbols.patch' from FreeBSD port repo * llvm: fetch most of 'missing-includes.patch' from upstream repo and reuse 'llvm-gcc11.patch' * llvm: regroup patches for missing include directives and drop compiler constraints for them * llvm: fetch 'llvm-gcc11.patch' from upstream repo * llvm: fetch 'no_cyclades.patch' from upstream repo * llvm: update comments and condition for 'no_cyclades9.patch' * llvm: rename variant 'omp' to 'openmp' * llvm: constrain and rename variant 'omp_tsan' to 'libomp_tsan' * llvm: rename variant 'omp_debug' to 'libomptarget_debug' * llvm: do not apply same patch twice * llvm: constrain and document the '*-thread.patch' patches * llvm: document the '~lld+libomptarget' conflict * llvm: update comments for the 'D133513.diff' patch
* llvm: add version 16.0.3 (spack#37472) * llvm: Fix hwloc@1 and hwloc@:2.3 compatibility (spack#35387) * llvm: optionally build compiler-rt, libcxx and libunwind as runtimes (spack#32476) * llvm: replace +omp_as_runtime with omp=runtime * llvm: fetch 'libomp-libflags-as-list.patch' from upstream repo * llvm: replace 'llvm14-hwloc-ompd.patch' with the official fix from upstream repo * llvm: fix-up for the black reformatting * llvm: fetch 'constexpr_longdouble.patch' from upstream repo * llvm: optionally build libcxx as a runtime * llvm: fetch 'llvm5-sanitizer-ustat.patch' from upstream repo * llvm: update 'sanitizer-ipc_perm_mode.patch' * llvm: refactor compiler conflicts when libcxx=project * llvm: fetch 'llvm_python_path.patch' from upstream repo * llvm: update comments and condition for 'xray_buffer_queue-cstddef.patch' * llvm: optionally build compiler-rt as a runtime * llvm: fetch 'lldb_external_ncurses-10.patch' from upstream repo * llvm: fetch 'llvm_py37.patch' from upstream repo * llvm: rename variant 'internal_unwind' to 'libunwind' * llvm: optionally build libunwind as a runtime * llvm: extend the list of maintainers * llvm: allow for explicit '~clang~flang~libomptarget~lldb~omp_debug~z3' * llvm: fetch 'llvm5-lld-ELF-Symbols.patch' from FreeBSD port repo * llvm: fetch most of 'missing-includes.patch' from upstream repo and reuse 'llvm-gcc11.patch' * llvm: regroup patches for missing include directives and drop compiler constraints for them * llvm: fetch 'llvm-gcc11.patch' from upstream repo * llvm: fetch 'no_cyclades.patch' from upstream repo * llvm: update comments and condition for 'no_cyclades9.patch' * llvm: rename variant 'omp' to 'openmp' * llvm: constrain and rename variant 'omp_tsan' to 'libomp_tsan' * llvm: rename variant 'omp_debug' to 'libomptarget_debug' * llvm: do not apply same patch twice * llvm: constrain and document the '*-thread.patch' patches * llvm: document the '~lld+libomptarget' conflict * llvm: update comments for the 'D133513.diff' patch * llvm: add new versions and set default for libomptarget according to os (spack#38092) * llvm: add new versions and set default for libomptarget according to os modified: var/spack/repos/builtin/packages/llvm/package.py * Incorporate reviewer suggestions Co-authored-by: Sergey Kosukhin <[email protected]> --------- Co-authored-by: Sergey Kosukhin <[email protected]> * Add 1606 (spack#38511) * llvm: fix build against libstdc++ 13 (spack#38329) llvm @13-15 is required for ispc, but fails to build with GCC 13. 14.0.6 and 15.0.7 built successfully with upstream patch, 13.0.1 still fails. Thus upstream patch is applied to 14 and 15 only. * ispc: on ARM, build with ARM targets enabled, and updates (spack#38080) * llvm: fix build with libcxx=none * ispc: checksum 1.20.0 * ispc: ensure that it does not crash immediately this would happen if linked to the wrong libc++ * ispc: fix build on macos find ncurses instead of curses and link against tinfo in order to avoid unresolved references to _del_curterm, _set_curterm, _setupterm, and _tigetnum * ispc: enable arm targets, if building on arm * ispc: remove double cmake argument I forgot to remove the constant -DARM_ENABLED=FALSE when adding -DARM_ENABLED with a value depending on target architecture * ispc: fix linux build since 1.20, linux build uses TBB as default tasking system and thus needs to depend on it * ispc: try to fix link error on linux link against both curses (as before) and tinfo (added because of macos) * ispc: update for recent llvm changes libcxx=none instead of ~libcxx --------- Co-authored-by: Satish Balay <[email protected]> Co-authored-by: Jordan Galby <[email protected]> Co-authored-by: Sergey Kosukhin <[email protected]> Co-authored-by: Sajid Ali <[email protected]> Co-authored-by: Sergey Kosukhin <[email protected]> Co-authored-by: Paul R. C. Kent <[email protected]> Co-authored-by: Martin Aumüller <[email protected]>
The main idea of this PR is to build
compiler-rt,libcxxandlibunwindas runtimes (not only when@15:, which was added in #32397 while I was working on this). This, for example, makes it possible to buildlibcxxeven when@13:%gcc@:10.I have also gone through several patches and updated constraints and comments for them. I also tried to remove patch files from Spack repo and switch to fetching them from the upstream repo, if possible (see #32476 (comment)).
There might be more patch files that can be removed from the repo in a similar way but I touched only those that I had to.A short discussion that started with #29530 (comment) might be worth mentioning here.