-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
consolidate libc and libssp into compiler-rt #7265
Labels
Milestone
Comments
andrewrk
added
the
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
label
Dec 1, 2020
andrewrk
added a commit
that referenced
this issue
Apr 26, 2022
* unify the logic for exporting math functions from compiler-rt, with the appropriate suffixes and prefixes. - add all missing f128 and f80 exports. Functions with missing implementations call other functions and have TODO comments. * move math functions from freestanding libc to compiler-rt (#7265) * enable all the f128 and f80 code in the stage2 compiler and behavior tests (#11161).
andrewrk
added a commit
that referenced
this issue
Apr 26, 2022
* unify the logic for exporting math functions from compiler-rt, with the appropriate suffixes and prefixes. - add all missing f128 and f80 exports. Functions with missing implementations call other functions and have TODO comments. - also add f16 functions * move math functions from freestanding libc to compiler-rt (#7265) * enable all the f128 and f80 code in the stage2 compiler and behavior tests (#11161). * update std lib to use builtins rather than `std.math`.
andrewrk
added a commit
that referenced
this issue
Apr 27, 2022
* unify the logic for exporting math functions from compiler-rt, with the appropriate suffixes and prefixes. - add all missing f128 and f80 exports. Functions with missing implementations call other functions and have TODO comments. - also add f16 functions * move math functions from freestanding libc to compiler-rt (#7265) * enable all the f128 and f80 code in the stage2 compiler and behavior tests (#11161). * update std lib to use builtins rather than `std.math`.
kubkon
pushed a commit
that referenced
this issue
May 2, 2022
* unify the logic for exporting math functions from compiler-rt, with the appropriate suffixes and prefixes. - add all missing f128 and f80 exports. Functions with missing implementations call other functions and have TODO comments. - also add f16 functions * move math functions from freestanding libc to compiler-rt (#7265) * enable all the f128 and f80 code in the stage2 compiler and behavior tests (#11161). * update std lib to use builtins rather than `std.math`.
andrewrk
added a commit
that referenced
this issue
Aug 17, 2022
This was disabled when self-hosted was less capable; now it is time to enable it. See related issue #7265
andrewrk
added a commit
that referenced
this issue
Aug 18, 2022
This was disabled when self-hosted was less capable; now it is time to enable it. See related issue #7265
andrewrk
added a commit
that referenced
this issue
Aug 18, 2022
This was disabled when self-hosted was less capable; now it is time to enable it. See related issue #7265
andrewrk
added a commit
that referenced
this issue
Aug 18, 2022
This was disabled when self-hosted was less capable; now it is time to enable it. See related issue #7265
andrewrk
added a commit
that referenced
this issue
Nov 7, 2023
andrewrk
added a commit
that referenced
this issue
Nov 9, 2023
andrewrk
added a commit
that referenced
this issue
Nov 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now, zig generates a "c" library that has functions such as
memcpy
andsqrt
because LLVM generates code that on those symbols. I propose to make zig's compiler-rt have all the symbols that codegen depends on, regardless of what library will typically provide them. Then our existing trick of using weak exports (which can be overridden by e.g. linking against libc) will make sure we don't provide too many functions. We already use function-sections to omit unused symbols.The benefits of this are simplicity, which will become even more clear when we have 2 competing backends: the LLVM one and the self-hosted zig one, which will each require a different set of compiler-rt symbols. We may even want to expose a build option to compiler-rt.zig (or maybe a different entry point?) so that compiler-rt source can know which backend it needs to provide symbols for.
The simplicity is not only for zig compiler developers, but for users as well. For example, this would simplify the usage of #7264 - we would not need equivalent CLI flags for these other 2 libs, and users would not need to deal with all 3 things.
The text was updated successfully, but these errors were encountered: