about summary refs log tree commit diff
path: root/library/std/src/sys/common
AgeCommit message (Collapse)AuthorLines
2024-01-11std: begin moving platform support modules into `pal`joboet-862/+0
2024-01-07Update test for `E0796` and `static_mut_ref` lintObei Sideg-0/+4
2023-10-28Remove asmjs from libraryJubilee Young-1/+0
2023-10-22use visibility to check unused imports and delete some stmtsbohan-0/+1
2023-09-22Add Minimal Std implementation for UEFIAyush Singh-1/+1
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-01fix(std): Rename os_str_bytes to encoded_bytesEd Page-3/+3
2023-08-14add a csky-unknown-linux-gnuabiv2 targetDirreke-0/+1
2023-07-24remove additional [allow(unused_unsafe)]James Dietz-9/+0
2023-07-24delete [allow(...)] from issue #74838James Dietz-4/+0
2023-07-18support for mips32r6 as a target_arch valuechenx97-0/+1
2023-07-18support for mips64r6 as a target_arch valuechenx97-0/+1
2023-06-04Avoid unwind across `extern "C"` in `thread_local::fast_local.rs`Thom Chiovoloni-11/+32
2023-05-13refactor: Remove redundant, private OsStr::bytesEd Page-3/+3
2023-05-05Rollup merge of #110946 - RalfJung:tls-realstd, r=m-ou-seYuki Okushi-1/+6
avoid duplicating TLS state between test std and realstd This basically re-lands https://github.com/rust-lang/rust/pull/100201 and https://github.com/rust-lang/rust/pull/106638, which got reverted by https://github.com/rust-lang/rust/pull/110861. This works around 2 Miri limitations: - Miri doesn't support the magic linker section that our Windows TLS support relies on, and instead knows where in std to find the symbol that stores the thread callback. - For macOS, Miri only supports at most one destructor to be registered per thread. The 2nd would not be very hard to fix (though the intended destructor order is unclear); the first would be a lot of work to fix. Neither of these is a problem for regular Rust code, but in the std test suite we have essentially 2 copies of the std code and then these both become issues. To avoid that we have the std test crate import the TLS code from the real std instead of having its own copy. r? ``````@m-ou-se``````
2023-05-02Rollup merge of #110895 - Ayush1325:thread-local-fix, r=thomccDylan DPC-1/+1
Remove `all` in target_thread_local cfg I think it was left there by mistake after the previous refactoring. I just came across it while rebasing to master.
2023-04-28handle cfg(bootstrap)Pietro Albini-3/+3
2023-04-28avoid duplicating TLS state between test std and realstdRalf Jung-1/+6
2023-04-27Remove all in target_thread_local cfgAyush Singh-1/+1
I think it was left there by mistake after previous refactoring. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-04-26Restructure and rename thread local things in std.Mara Bos-305/+274
2023-04-11Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiserMichael Goulet-0/+1
Initial support for loongarch64-unknown-linux-gnu Hi, We hope to add a new port in rust for LoongArch. LoongArch intro LoongArch is a RISC style ISA which is independently designed by Loongson Technology in China. It is divided into two versions, the 32-bit version (LA32) and the 64-bit version (LA64). LA64 applications have application-level backward binary compatibility with LA32 applications. LoongArch is composed of a basic part (Loongson Base) and an expanded part. The expansion part includes Loongson Binary Translation (LBT), Loongson VirtualiZation (LVZ), Loongson SIMD EXtension (LSX) and Loongson Advanced SIMD EXtension(LASX). Currently the LA464 processor core supports LoongArch ISA and the Loongson 3A5000 processor integrates 4 64-bit LA464 cores. LA464 is a four-issue 64-bit high-performance processor core. It can be used as a single core for high-end embedded and desktop applications, or as a basic processor core to form an on-chip multi-core system for server and high-performance machine applications. Documentations: ISA: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html ABI: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html More docs can be found at: https://loongson.github.io/LoongArch-Documentation/README-EN.html Since last year, we have locally adapted two versions of rust, rust1.41 and rust1.57, and completed the test locally. I'm not sure if I'm submitting all the patches at once, so I split up the patches and here's one of the commits
2023-04-04library/std: Add support for loongarch64zhaixiaojuan-0/+1
2023-03-31Workaround #109797 on windows-gnuJohn Kåre Alsaker-1/+3
2023-03-29Use #[inline] on Windows for thread local accessJohn Kåre Alsaker-48/+4
2023-03-10Moved thread_local implementation to sys::commonAyush Singh-315/+717
This allows removing all the platform-dependent code from `library/std/src/thread/local.rs` and `library/std/src/thread/mod.rs` Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-03-10Split __thread_local_inner macroAyush Singh-0/+316
Split the __thread_local_inner macro to make it more readable. Also move everything to crate::sys::common::thread_local. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-01-21library/std/sys_common: Define MIN_ALIGN for m68k-unknown-linux-gnuJohn Paul Adrian Glaubitz-0/+1
2022-11-26Remove redundant `all` in cfgChris Denton-6/+6
2022-10-03Reduce CString allocations in std as much as possibleAlex Saveau-0/+128
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-03-16resolve the conflict in compiler/rustc_session/src/parse.rscodehorseman-1/+1
Signed-off-by: codehorseman <cricis@yeah.net>
2022-01-13Set the allocation MIN_ALIGN for espidf to 4.Scott Mabin-2/+8
2021-11-10std: Get the standard library compiling for wasm64Alex Crichton-1/+2
This commit goes through and updates various `#[cfg]` as appropriate to get the wasm64-unknown-unknown target behaving similarly to the wasm32-unknown-unknown target. Most of this is just updating various conditions for `target_arch = "wasm32"` to also account for `target_arch = "wasm64"` where appropriate. This commit also lists `wasm64` as an allow-listed architecture to not have the `restricted_std` feature enabled, enabling experimentation with `-Z build-std` externally. The main goal of this commit is to enable playing around with `wasm64-unknown-unknown` externally via `-Z build-std` in a way that's similar to the `wasm32-unknown-unknown` target. These targets are effectively the same and only differ in their pointer size, but wasm64 is much newer and has much less ecosystem/library support so it'll still take time to get wasm64 fully-fledged.
2021-08-10STD support for the ESP-IDF frameworkivmarkov-1/+2
2021-04-14Update documentationChristiaan Dirkx-2/+12
2021-04-14Move `std::sys_common::alloc` to `std::sys::common`Christiaan Dirkx-0/+49