| Age | Commit message (Collapse) | Author | Lines |
|
Co-authored-by: Lewis McClelland <lewis@lewismcclelland.me>
|
|
New compiler configuration has been introduced that is designed to
replace the build script configuration `reliable_f16`, `reliable_f128`,
`reliable_f16_math`, and `reliable_f128_math`. Do this replacement here,
which allows us to clean up `std`'s build script.
All tests are gated by `#[cfg(bootstrap)]` rather than doing a more
complicated `cfg(bootstrap)` / `cfg(not(bootstrap))` split since the
next beta split is within two weeks.
|
|
The LLVM issue [1] was resolved and the fix was synced to rust-lang/rust
in [2].
This reverts commit c51b229140c885cac757a405a328a07e90d5bca9.
[1]: https://github.com/llvm/llvm-project/issues/129394
[2]: https://github.com/rust-lang/rust/pull/138695
|
|
Add std support to cygwin target
|
|
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
|
|
|
|
Signed-off-by: Ookiineko <chiisaineko@protonmail.com>
|
|
Enable `f16` for LoongArch
Blocked on https://github.com/rust-lang/compiler-builtins/pull/770
r? ```@tgross35```
Tracking issue for f16: https://github.com/rust-lang/rust/issues/116909
try-job: dist-loongarch64-linux
try-job: dist-loongarch64-musl
|
|
LLVM has crashes at some `half` operations when built with assertions
enabled if fp-armv8 is not available [1]. Things seem to usually work,
but we are reaching LLVM undefined behavior so this needs to be
disabled.
[1]: https://github.com/llvm/llvm-project/issues/129394
|
|
|
|
It seems as if `f16` works on MIPS now according to my
testing on Rust master with LLVM 20, and I was asked to
create PRs with my changes.
I only tested on the flavour of `mipsel-unknown-linux-gnu`
hardware that happens to be available to me, so I can't say
anything about other MIPS hardware, but from a casual
skimming of the LLVM code ([1], [2]) it seems like `f16`
should work on all MIPS hardware. So enable it for all MIPS
hardware.
[1]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/Target/Mips/MipsISelLowering.h#L370
[2]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/CodeGen/TargetLoweringBase.cpp#L1367-L1388
|
|
With the `compiler-builtins` update to 0.1.137 [1], we now provide
symbols necessary to work with `f128` everywhere. This means that we are
no longer restricted to 64-bit linux, and can enable tests by default.
There are still a handful of platforms that need to remain disabled
because of bugs. This patch additionally disables the following:
1. MIPS [2]
2. 32-bit x86 [3]
Math support is still off by default since those symbols are not yet
available.
[1]: https://github.com/rust-lang/rust/pull/132433
[2]: https://github.com/llvm/llvm-project/issues/96432
[3]: https://github.com/llvm/llvm-project/issues/77401
|
|
|
|
There is a MinGW ABI bug that prevents `f16` and `f128` from being
usable on `windows-gnu` targets. This does not affect MSVC; however, we
have `f16` and `f128` tests disabled on all Windows targets.
Update the gating to only affect `windows-gnu`, which means `f16` tests
will be enabled. There is no effect for `f128` since the default
fallback is `false`.
|
|
These were disabled because Apple uses a special ABI for `f16`.
`compiler-builtins` merged a fix for this in [1], which has since
propagated to rust-lang/rust. Enable tests since there should be no
remaining issues on these platforms.
[1]: https://github.com/rust-lang/compiler-builtins/pull/675
|
|
The only requirement for `f16` support, aside from LLVM not crashing and
no ABI issues, is that symbols to convert to and from `f32` are
available. Since the update to compiler-builtins in [1], we now provide
these on all platforms.
This also enables `f16` math since there are no further requirements.
Still excluded are platforms for which LLVM emits infinitely-recursing
code.
[1]: https://github.com/rust-lang/rust/pull/125016
|
|
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
|
|
|
|
|
|
Since the `compiler_builtins` update [1], ABI bugs on x86 should be
resolved. Enable tests for f16 on these platforms now.
`f16` math functions (`reliable_f16_math`) are still excluded because
there is an LLVM crash for powi [2].
[1]: https://github.com/rust-lang/rust/pull/125016
[2]: https://github.com/llvm/llvm-project/issues/105747
|
|
also fix some cfg logic
|
|
This adds missing functions for math operations on the new float types.
Platform support is pretty spotty at this point, since even platforms
with generally good support can be missing math functions.
`std/build.rs` is updated to reflect this.
|
|
|
|
To avoid this linker error:
$ sudo apt install libc6-mips-cross gcc-mips-linux-gnu
$ CC_mips_unknown_linux_gnu=mips-linux-gnu-gcc \
CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
./x test library/std --target mips-unknown-linux-gnu
undefined reference to `__gnu_f2h_ieee'
You get the same linker error also with mipsel, mips64 and
mips64el toolchains.
|
|
The target_arch of `powerpc64le` is `powerpc64`, so
`powerpc64le` can be removed from a match arm in build.rs
related to f16.
You can check available `target_arch`:s with:
$ rustc +nightly -Zunstable-options --print all-target-specs-json \
| grep powerpc | grep arch | sort | uniq
"arch": "powerpc",
"arch": "powerpc64",
|
|
There are some complexities about what platforms we can test f16 and
f128 on. Put this in build.rs so we have an easy way to configure tests
with a single attribute, and keep it up to date.
|
|
|
|
|
|
|
|
Introducing a new config for this purpose as NetBSD 9 or 8 will be still around
for a good while. For now, we re finally enabling sys::unix::rand::getrandom.
|
|
Currently, when building with `build-std`, some library build scripts
check properties of the target by inspecting the target triple at
`env::TARGET`, which is simply set to the filename of the JSON file
when using JSON target files.
This patch alters these build scripts to use `env::CARGO_CFG_*` to
fetch target information instead, allowing JSON target files
describing platforms without `restricted_std` to build correctly when
using `-Z build-std`.
Fixes wg-cargo-std-aware/#60.
|
|
Co-authored-by: Frank Laub <flaub@risc0.com>
Co-authored-by: nils <nils@risc0.com>
Co-authored-by: Victor Graf <victor@risczero.com>
Co-authored-by: weikengchen <w.k@berkeley.edu>
|
|
Signed-off-by: 袁浩 <yuanhao34@huawei.com>
|
|
|
|
|
|
since freebsd 11 had been removed, minimum is now 12.
|
|
This reverts commit 93677276bc495e78f74536385a16201d465fd523
because it caused issues for projects building the standard
library with non-cargo build systems.
|
|
|
|
Based on #99883 by @Arc-blroth
Depends on rust-lang/backtrace-rs#556 and rust-lang/cc-rs#705
|
|
- Update Example
- Add thread_parking to sys::uefi
- Fix unsafe in unsafe errors
- Improve docs
- Improve os/exit
- Some asserts
- Switch back to atomics
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Implemented modules:
1. alloc
2. os_str
3. env
4. math
Tracking Issue: https://github.com/rust-lang/rust/issues/100499
API Change Proposal: https://github.com/rust-lang/libs-team/issues/87
This was originally part of https://github.com/rust-lang/rust/pull/100316. Since
that PR was becoming too unwieldy and cluttered, and with suggestion
from @dvdhrm, I have extracted a minimal std implementation to this PR.
Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
|
|
|
|
Add the `xous` target to libstd. Currently this defers everything to the
`unsupported` target.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
|
|
It might happen that a synthetic target name does not match one of the
hardcoded ones in std's build script, causing std to fail to build. This
commit changes the std build script avoid including the restricted-std
feature unconditionally when a synthetic target is being built.
|
|
|
|
introducing new build config as well.
|
|
Co-authored-by: gh-tr <troach@qnx.com>
|
|
|
|
Co-authored-by: Ian Chamberlain <ian.h.chamberlain@gmail.com>
Co-authored-by: Mark Drobnak <mark.drobnak@gmail.com>
|