-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Audit dependencies of libcore #27200
Comments
Note that this is why we strongly recommend linking with |
|
Yeah we may just want to move a bunch of these to std instead of trying to put them in core. All of these float functions correspond to LLVM intrinsics, but I've only ever seen them lower to a function call so there's no much benefit to being in core. Some like |
I'm a bit confused. So these float intrinsics sometimes can be generated by LLVM directly, but other times fall back on function definitions with compilerrt, right? Are they used (e.g. in numeric trait impls) or just exposed in libcore today? Also, wouldn't moving them to std prevents doing such float operations in freestanding environments where they are available? That seems bad. Gatekeeping them with a cfg! and/or target JSON would offer the most flexibility---and early-catching convenience if these intrinsics are used trait impls---right? |
We may want a |
I believe this was basically appropriately dealt with in #27823, the only remaining dependencies are:
The first three categories I think are fine (e.g. use Rust + rlibc and you're fine), the last of which is unfortunate but coherence kinda ties our hands. As a result I'm going to close this for now in favor of #27701 |
Current output of
objdump -t libcore-7e44814b.rlib | grep UND
on x86-64 Linux:rust_eh_personality
andrust_begin_unwind
are lang-items expected to be defined by the user.__morestack
,__powidf2
, and__powisf2
are defined by libgcc.memcpy
,memset
, andmemcmp
(?) have to be defined somewhere because LLVM can insert calls to them implicitly.The various floating-point functions are a bit dubious; it probably doesn't make sense to require freestanding environments to define
log2()
.We should make sure this list is appropriate, and have an automated test to make sure it doesn't change accidentally.
The text was updated successfully, but these errors were encountered: