Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAudit dependencies of libcore #27200
Comments
This comment has been minimized.
This comment has been minimized.
|
Note that this is why we strongly recommend linking with |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
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? |
This comment has been minimized.
This comment has been minimized.
|
We may want a |
steveklabnik
added
the
A-libs
label
Jul 22, 2015
alexcrichton
referenced this issue
Aug 12, 2015
Closed
Tracking issue for f32/f64 support in libcore #27702
This comment has been minimized.
This comment has been minimized.
|
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 |
eefriedman commentedJul 21, 2015
Current output of
objdump -t libcore-7e44814b.rlib | grep UNDon x86-64 Linux:rust_eh_personalityandrust_begin_unwindare lang-items expected to be defined by the user.__morestack,__powidf2, and__powisf2are 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.