-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add support for LLVM 7 #7986
Add support for LLVM 7 #7986
Conversation
Do you have a working Crystal compiler with LLVM7? |
@KaneRoot the head of this branch can be built to have a compiler powered by llvm-7 following https://crystal-lang.org/reference/installation/from_source_repository.html This is not changing the llvm used in the distribution. Depending on the installation method you might get an update in the llvm version used or not. But building it from sources will allow you to pick which one you need/want. |
Similarly to how LLVM 6 support was added in commit 249a2ed: - Rename functions that conflict with those added to llvm-c/DebugInfo.h in LLVM 7 - Pass a reference to a module to the bitcode writer (ref LLVM r325155)
Note: it seems to not be used
Add LibIntrinsics to direct API. Create Intrinsics module to adapt different versions. Since the arguments needs to be literals in mem operations, those methods are macros. countleading and counttrailing are also macros since their arguments must be literals.
While finding the right way to set the alignment of the attributes a couple of other bindings were added. LLVMSetInstrParamAlignment is the one that we needed to use
I finally found the way to set the alignment attributes Since the are a couple of changes that could affect the distribution I trigger a maintenance build in https://circleci.com/workflow-run/6fafeb18-7aae-4b3b-a930-96a37f438ab0 Once the CI is happy we only need a review for merging. |
Awesome, do you plan to look at LLVM8 port as well? It would be awesome to see Crystal working with the latest version of LLVM. |
Fixes #6754
The issue with the exception handing was that the assumptions in the code traversing eh_table structures didn't hold in llvm-7 and the code didn't have assertions for them. They were harder to diagnose. The code is now extracted and reused for arm.