-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
refactor: upgrade to official inkwell #254
Conversation
d53ab1b
to
21e17c0
Compare
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
==========================================
- Coverage 78.63% 78.49% -0.15%
==========================================
Files 212 215 +3
Lines 12681 12719 +38
==========================================
+ Hits 9972 9984 +12
- Misses 2709 2735 +26
Continue to review full report at Codecov.
|
92be742
to
45c5182
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, we'll be able to publish all of our crates. Nice! 🎉
09bb921
to
bd9df1c
Compare
bd9df1c
to
97f4ca8
Compare
This PR eliminates the need to maintain a custom version of Inkwell. We used a custom version of Inkwell because our code could not handle a breaking change in their code; the lifetime of the
inkwell::context::Context
. Adding this lifetime was hard because we cached a lot of Inkwell related computations in the salsaIrDatabase
. However, salsa doesn't work with lifetimes, so we couldn't add the lifetimes. Also, the LLVM context is single threaded which caused our database to not beSync
and we couldn't perform parallel LLVM computations.This PR adds the context lifetime throughout the codebase enabling us to use the latest (and officially) released version of Inkwell. This will also allow us to finally publish the compiler crates.
Besides the inkwell update, the code is also updated to work with LLVM8 (over LLVM7). In the future we should be able to update to LLVM10+, however, due to a [bug in LLD introduced in LLVM 9][https://reviews.llvm.org/D86401) we couldn't invoke the linker multiple times. Once the fix for that bug lands in a release version of LLVM we can upgrade further (inkwell already supports LLVM10).
Related to inkwell issues: TheDan64/inkwell#187
Closes #151