about summary refs log tree commit diff
path: root/library/std/build.rs
AgeCommit message (Collapse)AuthorLines
2025-09-24std: add support for armv7a-vex-v5 targetTropical-0/+1
Co-authored-by: Lewis McClelland <lewis@lewismcclelland.me>
2025-04-27Use `feature(target_has_reliable_f16_f128)` in library testsTrevor Gross-110/+0
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.
2025-04-02Revert "Disable `f16` on Aarch64 without `neon`"Trevor Gross-7/+0
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
2025-03-17Rollup merge of #137621 - Berrysoft:cygwin-std, r=joboetJacob Pratt-0/+1
Add std support to cygwin target
2025-03-11Remove unnecessary parensNicole L-1/+1
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2025-03-10Apply rustc-0023-Add-Trusty-OS-support-to-Rust-std.patchNicole LeGare-0/+1
2025-03-10Initial STD support for Cygwin王宇逸-0/+1
Signed-off-by: Ookiineko <chiisaineko@protonmail.com>
2025-03-07Rollup merge of #137674 - heiher:enable-f16-loong, r=tgross35Matthias Krüger-1/+0
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
2025-03-01Disable `f16` on Aarch64 without `neon`Trevor Gross-0/+7
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
2025-02-26Enable `f16` for LoongArchWANG Rui-1/+0
2025-02-20Enable `f16` for MIPSMartin Nordholts-1/+0
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
2024-11-03Enable `f128` tests on all non-buggy platforms 🎉Trevor Gross-7/+12
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
2024-10-05enable f16 and f128 on windows-gnullvm targetsMateusz Mikuła-2/+3
2024-09-30Enable `f16` tests on non-GNU WindowsTrevor Gross-3/+3
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`.
2024-09-28Enable `f16` tests on x86 Apple platformsTrevor Gross-3/+0
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
2024-09-27Enable `f16` on platforms that were missing conversion symbolsTrevor Gross-14/+11
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
2024-09-24Initial std library support for NuttXHuang Qi-0/+1
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-03Port std library to RTEMSJan Sommer-0/+1
2024-08-31Fixed some typos in the standard library documentation/commentsranger-ross-1/+1
2024-08-23Enable `f16` tests on x86 and x86-64Trevor Gross-8/+8
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
2024-08-08std float tests: special-case Miri in feature detectionRalf Jung-0/+9
also fix some cfg logic
2024-08-01Add math functions for `f16` and `f128`Trevor Gross-0/+37
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.
2024-07-30Match LLVM ABI in `extern "C"` functions for `f128` on Windowsbeetrees-1/+3
2024-07-03std: Set has_reliable_f16 to false for MIPS targets in build.rsMartin Nordholts-0/+2
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.
2024-07-03library/std/build.rs: "powerpc64le" is not a target_archMartin Nordholts-1/+1
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",
2024-06-25Add build.rs config for reliable `f16` and `f128`Trevor Gross-0/+62
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.
2024-05-23Move some expected cfgs to std build.rs as per Cargo recommandationUrgau-1/+7
2024-05-23Replace fake "restricted-std" Cargo feature by custom cfgUrgau-1/+2
2024-03-18Support for visionOSAdam Gastineau-0/+1
2024-02-11std: enabling new netbsd (10) calls.David Carlier-1/+3
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.
2024-02-05Add support for custom JSON targets when using build-std.Lawrence Tang-35/+41
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.
2024-01-22zkvm: add partial std supportErik Kaneda-0/+1
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>
2023-12-07add teeos std impl袁浩-0/+1
Signed-off-by: 袁浩 <yuanhao34@huawei.com>
2023-10-28Remove asmjs from libraryJubilee Young-1/+0
2023-10-20changes from feedbackDavid Carlier-6/+2
2023-10-20std: freebsd build update.David CARLIER-4/+2
since freebsd 11 had been removed, minimum is now 12.
2023-10-13Revert "Invoke `backtrace-rs` buildscript in `std` buildscript"Peter Jaszkowiak-8/+0
This reverts commit 93677276bc495e78f74536385a16201d465fd523 because it caused issues for projects building the standard library with non-cargo build systems.
2023-10-09Support AIX in Rust standard libraryQiu Chaofan-0/+1
2023-10-02Invoke `backtrace-rs` buildscript in `std` buildscriptPeter Jaszkowiak-0/+8
Based on #99883 by @Arc-blroth Depends on rust-lang/backtrace-rs#556 and rust-lang/cc-rs#705
2023-09-22Rebase to masterAyush Singh-1/+0
- 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>
2023-09-22Add Minimal Std implementation for UEFIAyush Singh-1/+2
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>
2023-09-21added support for GNU/HurdSamuel Thibault-0/+1
2023-08-22libstd: add xous to libstdSean Cross-0/+1
Add the `xous` target to libstd. Currently this defers everything to the `unsupported` target. Signed-off-by: Sean Cross <sean@xobs.io>
2023-06-21wip: Support Apple tvOS in libstdThom Chiovoloni-1/+1
2023-06-12make sure the standard library compiles properly with synthetic targetsPietro Albini-0/+2
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.
2023-05-07PS Vita std supportNikolay Arhipov-0/+1
2023-03-27socket ancillary data implementation for FreeBSD (from 13 and above).David CARLIER-0/+3
introducing new build config as well.
2023-02-28Add QNX Neutrino support to libstdFlorian Bartels-0/+1
Co-authored-by: gh-tr <troach@qnx.com>
2022-07-20Library changes for Apple WatchOSVladimir Michael Eatwell-0/+1
2022-06-13Horizon OS STD supportMeziu-0/+1
Co-authored-by: Ian Chamberlain <ian.h.chamberlain@gmail.com> Co-authored-by: Mark Drobnak <mark.drobnak@gmail.com>