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

Support LLVM 16 #13181

Merged
merged 25 commits into from
May 12, 2023
Merged

Conversation

HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Mar 12, 2023

Tested on x86_64-linux-gnu for some build between 16.0.0-rc3 and rc4 only. No changes were required in the compiler at all because we already switched to opaque pointers for LLVM 15.

This does not include the debug information stuff in #13174.

@HertzDevil
Copy link
Contributor Author

This workaround:

- name: Patch LLVM for VS 2019 16.7.0
working-directory: ./llvm-src
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
sed -i 's/#ifdef HAVE_STD_IS_TRIVIALLY_COPYABLE/#if 0/' include/llvm/Support/type_traits.h

is also unnecessary for LLVM 16 due to https://reviews.llvm.org/rG36357c967cdb9006dd7de9be0dd52068da2a4f96

@HertzDevil HertzDevil marked this pull request as ready for review March 19, 2023 02:58
@HertzDevil
Copy link
Contributor Author

/mnt/llvm/bin/llvm-config: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

🤔

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

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

🚀

@straight-shoota straight-shoota added this to the 1.8.0 milestone Mar 31, 2023
.github/workflows/llvm.yml Outdated Show resolved Hide resolved
@HertzDevil HertzDevil removed this from the 1.8.0 milestone Mar 31, 2023
@HertzDevil
Copy link
Contributor Author

HertzDevil commented May 9, 2023

It looks like both the 16.0.2 and 16.0.3 packages work. I could reproduce the crash locally with 16.0.0 but still have no clue what was going on. C++ ABI mismatch...?

EDIT: it is probably due to a missing LD_LIBRARY_PATH

.github/workflows/llvm.yml Outdated Show resolved Hide resolved
@straight-shoota straight-shoota added this to the 1.9.0 milestone May 11, 2023
Comment on lines +22 to +24
llvm_ubuntu_version: "18.04"
- llvm_version: "15.0.6"
llvm_ubuntu_version: "18.04"
Copy link
Member

@beta-ziliani beta-ziliani May 11, 2023

Choose a reason for hiding this comment

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

Why are these in 18.04? Don't they work in 20.04? 18.04 is close to EOL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's the version number that comes with the LLVM download, our base image is now always 22.04

@straight-shoota straight-shoota merged commit 5b151d8 into crystal-lang:master May 12, 2023
42 of 46 checks passed
@HertzDevil HertzDevil deleted the feature/llvm-16 branch May 12, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants