Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for runtime builtins #159

Merged
merged 4 commits into from
Jan 13, 2025
Merged

Conversation

Fernthedev
Copy link
Contributor

Referencing the original issue here, rust-lang/compiler-builtins#468, it seems some builtins for Android aren't included properly. This adds flags that links the proper builtins statically.

The default clang version constant is undesirable but I'm not sure how else to do it.

@Fernthedev
Copy link
Contributor Author

As the MacOS M1 CI failed (and likely the Linux one will too) I'll fix it once I test this on the Mac. I suspect it's due to the linker include path being different than what I originally anticipated.

Tested on Windows originally.

@bbqsrc
Copy link
Owner

bbqsrc commented Jan 9, 2025

The version of clang in NDK 26 is 17. You'll need to use a function to find the highest version available of the clang libraries if we want this to be maintainable in the long run.

@bbqsrc bbqsrc merged commit 1d1a6dc into bbqsrc:main Jan 13, 2025
12 checks passed
@bbqsrc
Copy link
Owner

bbqsrc commented Jan 13, 2025

@Fernthedev Merged it because it works, but we avoid using RUSTFLAGS as much as possible because it doesn't lead to good things overall. I would like that the CLI has a flag like --link-builtins that optionally enables this functionality, before I put it into a release. What do you think?

@Fernthedev
Copy link
Contributor Author

I see. Would it be preferable if this was under a flag similar to bindgens? --builtins perhaps?

@bbqsrc
Copy link
Owner

bbqsrc commented Jan 13, 2025

--link-builtins.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants