Removed the `weak-intrinsics` feature, so that all functions
will have the `weak` linkage attribute.
Also this fixed the bug in
https://github.com/rust-lang/rust/issues/124042.
Before this commit, generated code will be
```rust
pub extern "C" fn <name>(...) -> ... {
// code...
}
pub mod <name> {
#[linkage = "weak"]
#[no_mangle]
pub extern "C" fn <name>(...) -> ... {
super::<name>(...)
}
}
```
The issue is that there is 2 `weak` linkage, the first one is not required.
Along refactoring `weak` attributes, this was fixed.
This is a continuation/fix of 018616e. In that commit, we made it add
the math functions to all platforms (except apple-targets and windows),
and use `weak` linking, so that it can be used if the system doesn't
have those functions.
Didn't notice `mod math` was behind another set of `cfg`, so removed it
as well here.
The Apple ARM silicon has been around for a while now and hopefully will
become Rust Tier 1 at some point. Add it to CI since it is distinct
enough from aarch64-linux and x86_86-darwin that there may be
differences.
Trying to run testcrate on non-linux aarch64 currently hits a
compilation error. Make this test linux-only, to be consistent with the
`aarch64_linux` module that it depends on.
Additionally, enable the `aarch64_linux` module for `target_arch =
"arm64ec"` to be the same as these tests.
This is a replacement for https://github.com/rust-lang/libm/pull/290
This fixes crashes during compilations for targets that don't have math
symbols by default.
So, we will provide them libm symbols, but mark it as `weak` (if its
supported), so that the linker will choose the system builtin functions,
since those are sometimes more optimized.
If the linker couldn't find those, it will go with `libm`
implementation.
libLLVMSupport.a(DynamicLibrary.cpp.obj) references ___chkstk, which is
an alias of __alloca in libgcc. This crate provided __alloca, but
libgcc's implementation was also pulled in by the linker due to the
reference to ___chkstk, causing a multiple definition linker error.
Providing that symbol here prevents that.
Fixes#585
It turns out that these also don't build on x86 + MSVC. Rather
than fixing up the condition, I'm just deleting them entirely.
As far as I know, Rust does not support 80-bit floats and has
no plan to support them, so we shouldn't need them.