rust/library/std
Yuki Okushi d98e174497
Rollup merge of #110946 - RalfJung:tls-realstd, r=m-ou-se
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-05 12:46:25 +09:00
..
benches
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #110946 - RalfJung:tls-realstd, r=m-ou-se 2023-05-05 12:46:25 +09:00
tests Exclude SGX from create_dir_all_bare test 2023-02-21 18:33:20 +00:00
build.rs socket ancillary data implementation for FreeBSD (from 13 and above). 2023-03-27 16:48:41 +01:00
Cargo.toml Auto merge of #110562 - ComputerDruid:riscv, r=tmandry 2023-04-27 01:29:50 +00:00