Skip to content
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

LLVM 15 conda recipe #1036

Merged
merged 24 commits into from
Jun 27, 2024
Merged

LLVM 15 conda recipe #1036

merged 24 commits into from
Jun 27, 2024

Conversation

sklam
Copy link
Member

@sklam sklam commented Apr 1, 2024

No description provided.

@sklam
Copy link
Member Author

sklam commented Apr 5, 2024

f0def58 builds successfully on all platform in the buildfarm

@sklam
Copy link
Member Author

sklam commented Apr 11, 2024

passed numba testsuite when running manually on linux-64 machine

sklam and others added 8 commits April 11, 2024 14:52
This is a backport of:

```
commit 7939ce39dac0078fef7183d6198598b99c652c88
Author: Jon Roelofs <[email protected]>
Date:   Fri Nov 17 14:21:57 2023 -0800

    [builtins] Move cfi start's after the symbol name [NFC]

    ... in preparation for diagnosing improperly nested .cfi regions.

    See https://reviews.llvm.org/D155245
```

The ordering of `.cfi_startproc` and the function name in compiler-rt's
`assembly.h` triggers a new diagnostic about improperly nested `.cfi`
regions in Clang 18 onwards. This is fixed in compiler-rt upstream, but
needs to be applied to compiler-rt from LLVM 15 because we're building
it with Clang 18 in some cases.

References to discussions of the issue:

- rust-lang/llvm-project@8238831
- https://issues.chromium.org/issues/40945072
The symbols in the compiler-rt builtins library are private external by
default on MacOS. We need them to be visible so we can link against them
(e.g. when building libllvmlite.so). This patch makes the symbols
visible when the CMake option `COMPILER_RT_BUILTINS_HIDE_SYMBOLS` is
off. Note that this is an existing option for the compiler-rt build, and
the flags requiring modification in this patch appear to be an
oversight.

References:

- https://discourse.llvm.org/t/lld-automatically-hide-symbols-with-prefix/73192
- numba#986 (comment)
This enables the build of compiler-rt builtins with the following
changes:

- Add `compiler-rt` to the list of LLVM projects to build
- Disable the build of all `compiler-rt` components except for the
  builtins. Whilst it would be interesting to add these, they seem to
  require clang to be built at the same time.
- Setting the `COMPILER_RT_BUILTINS_HIDE_SYMBOLS` CMake option to `OFF`,
  to ensure that we can link against those symbols in the general case.

Note that these changes are simpler than previous efforts towards
enabling `compiler-rt` builtins (e.g. numba#979) - this is because we now
build as part of the whole `llvm-project` tree, which simplifies things
and removes issues that had to be worked around when building it
separately.
@jakirkham
Copy link
Contributor

Thanks all! 🙏

Given support for LLVM 15 was added in PR ( #1035 ), what is still needed here?

@gmarkall
Copy link
Member

We need to merge this and build the llvmdev package, as I understand it. (This requires the setup internal to Anaconda on their build farm).

After that, I think we can switch the llvmlite CI over to use LLVM 15 by default, and start to move it from being experimental to being the default supported version.

@sklam
Copy link
Member Author

sklam commented Jun 14, 2024

BFID llvmdev_llvm15_4

@sklam
Copy link
Member Author

sklam commented Jun 17, 2024

BFID llvmdev_llvm15_4

build passed

@sklam sklam added BuildFarm Passed For PRs that have been through the buildfarm and passed and removed 2 - In Progress labels Jun 17, 2024
@sklam sklam marked this pull request as ready for review June 17, 2024 14:50
@sklam
Copy link
Member Author

sklam commented Jun 17, 2024

Now testing llvmdev build against llvmlite test in llvmlite_llvm15_3

@sklam
Copy link
Member Author

sklam commented Jun 17, 2024

llvmlite_llvm15_3 also passed.

@gmarkall gmarkall self-requested a review June 17, 2024 21:18
Copy link
Member

@gmarkall gmarkall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had previously reviewed this and tested it locally and my understanding is that we were only waiting on a build farm run, so I think this is OK to move to RTM and build new LLVMdev 15 packages for the main channel so we can switch llvmlite over to more general testing with LLVM 15.

@gmarkall
Copy link
Member

Marked RTM as per discussion in triage meeting.

@sklam sklam added this to the v0.44.0 milestone Jun 27, 2024
@sklam sklam merged commit 41acda3 into numba:main Jun 27, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to merge BuildFarm Passed For PRs that have been through the buildfarm and passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants