Repository navigation
Math symbols - #70
Merged
Merged
Math symbols#70
Conversation
This adds the missing functions `rust/std` require that are normally available in `libc` We will update `rust` as well to use these new functions. We have modified `libm` in the PR: rust-lang/libm#290 to enable building `std`.
This is clunky, as in `std`, we are using a relative path to `emerald_std`, and I don't really like that. But just to get this done, since the PRs are very slow. Here, we are using unstable feature to add all the math symbols, but with `weak` linking, so that the linker won't panic when it finds two of them defined (as some of them are already defined).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Linked missing math libraries manually for now until rust-lang/compiler-builtins#577 is merged.
This fixes math symbols not found during linkage, as it relies on libc or other sources, that provide math functions from the OS (of course we don't have that)
Related issue
None
Changes
Added math libraries and linked it so that it can be included in
std, sincestdusesemerald_stdas a dep.Checklist