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

Reduce our exposure to LLVM API breakage #21862

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Oct 31, 2024

LLVM recently introduced new Triple::ArchType members in 19.1.3 which broke our static assertions in zig_llvm.cpp. When implementing a fix for that, I realized that we don't even need a lot of the stuff we have in zig_llvm.(cpp,h) anymore. This PR trims the interface down considerably, and also fixes a few issues I noticed in the affected code.

LLVM recently introduced new Triple::ArchType members in 19.1.3 which broke our
static assertions in zig_llvm.cpp. When implementing a fix for that, I realized
that we don't even need a lot of the stuff we have in zig_llvm.(cpp,h) anymore.
This commit trims the interface down considerably.
* AIX has its own bespoke format.
* Handle all Apple platforms.
* FreeBSD and OpenBSD both use the GNU format in LLVM.
* Windows has since been switched to the COFF format by default in LLVM.
@alexrp alexrp requested a review from andrewrk October 31, 2024 00:42
@andrewrk
Copy link
Member

OK, nice. I suppose we can use a more relaxed process for finding out about changes to LLVM target information now that we emit bitcode rather than using the LLVM library to build a module.

Thanks!

@andrewrk andrewrk merged commit f5ade5e into ziglang:master Oct 31, 2024
10 checks passed
@alexrp alexrp deleted the llvm-19-api-break branch October 31, 2024 08:26
@alexrp
Copy link
Member Author

alexrp commented Nov 2, 2024

I'll still keep a close eye on triple changes on the LLVM side for future LLVM upgrades.

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.

2 participants