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: enable the backend even when not linked to llvm #16747

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

jacobly0
Copy link
Member

@jacobly0 jacobly0 commented Aug 9, 2023

With these changes, it is now possible to compile the llvm backend even without llvm linked. There is a lot of work to make this generally useful, but it is already capable of performing -fno-libllvm -fno-emit-bin -fstrip --verbose-llvm-ir=output.ll without any external help. Compiling the behavior tests to an ll file and then using llvm to finish the compilation separately produces a binary that passes all tests.

src/link/Elf.zig Outdated Show resolved Hide resolved
@jacobly0 jacobly0 force-pushed the llvm-wo-libllvm branch 2 times, most recently from 67ebb59 to 7838cff Compare August 9, 2023 08:24
This function does not seem to differ in any interesting way from
`!typeRequiresComptime`, other than the `is_extern` param which is only
used in one place, and some differences did not seem correct anyway.

My reasoning for changing opaque types to be comptime-only is that
`explainWhyTypeIsComptime` is quite happy to explain why they are. :D
This makes `std.ArrayListUnmanaged(void)` usable.
@andrewrk andrewrk merged commit b820d5d into ziglang:master Aug 10, 2023
10 checks passed
@jacobly0 jacobly0 deleted the llvm-wo-libllvm branch August 11, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants