rust/library
Matthias Krüger 2cf93ac9c8
Rollup merge of #122730 - ferrocene:hoverbear/qnx-ucred-cfgs, r=Amanieu
Expose `ucred::peer_cred` on QNX targets to enable dist builds

After following https://doc.rust-lang.org/rustc/platform-support/nto-qnx.html I attempted to run the following `x.py` command:

```bash
export build_env='
    CC_aarch64-unknown-nto-qnx710=qcc
    CFLAGS_aarch64-unknown-nto-qnx710=-Vgcc_ntoaarch64le_cxx
    CXX_aarch64-unknown-nto-qnx710=qcc
    AR_aarch64_unknown_nto_qnx710=ntoaarch64-ar
    CC_x86_64-pc-nto-qnx710=qcc
    CFLAGS_x86_64-pc-nto-qnx710=-Vgcc_ntox86_64_cxx
    CXX_x86_64-pc-nto-qnx710=qcc
    AR_x86_64_pc_nto_qnx710=ntox86_64-ar'
env $build_env ./x.py --stage 2 dist rust-std  --target aarch64-unknown-nto-qnx710,x86_64-pc-nto-qnx710,x86_64-unknown-linux-gnu
```

The result was the following error:

```
   Compiling object v0.32.2
   Compiling std_detect v0.1.5 (/home/ana/git/rust-lang/rust/library/stdarch/crates/std_detect)
   Compiling addr2line v0.21.0
error: function `peer_cred` is never used
  --> library/std/src/os/unix/net/ucred.rs:89:12
   |
89 |     pub fn peer_cred(socket: &UnixStream) -> io::Result<UCred> {
   |            ^^^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`

error: could not compile `std` (lib) due to 1 previous error
Build completed unsuccessfully in 0:06:25
```

I contacted `@flba-eb` and `@gh-tr` over email and we confirmed that `peer_cred` here should be flagged on `nto` targets. This should enable the clean `x.py --stage 2 dist rust-std` command on these platforms.
2024-03-20 05:51:23 +01:00
..
alloc Auto merge of #122055 - compiler-errors:stabilize-atb, r=oli-obk 2024-03-19 00:04:09 +00:00
backtrace@6fa4b85b99 Use rust-lang/backtrace-rs@6fa4b85 2024-03-14 12:37:43 -07:00
core Rollup merge of #122720 - heisen-li:offset_of, r=workingjubilee 2024-03-19 18:03:53 +01:00
panic_abort Cleanup windows abort_internal 2024-03-02 18:22:15 +00:00
panic_unwind Rollup merge of #121438 - coolreader18:wasm32-panic-unwind, r=cuviper 2024-03-11 09:29:34 -07:00
portable-simd Merge commit '649110751ef4f27440d7cc711b3e07d11bf02d4a' into sync-portable-simd-2024-02-18 2024-02-18 10:14:03 -05:00
proc_macro Fix typo in lib.rs of proc_macro 2024-03-12 13:35:14 +01:00
profiler_builtins Update version of cc crate 2024-03-14 16:42:15 +00:00
rtstartup library: Fix warnings in rtstartup 2024-01-06 01:32:03 +03:00
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #122730 - ferrocene:hoverbear/qnx-ucred-cfgs, r=Amanieu 2024-03-20 05:51:23 +01:00
stdarch@56087ea170 Rename wasm32-wasi-preview2 to wasm32-wasip2 2024-02-27 10:14:45 -05:00
sysroot Expose compiler-builtins-weak-intrinsics feature for -Zbuild-std 2023-06-23 11:15:34 +01:00
test libtest: Print timing information on WASI 2024-03-11 09:36:35 -07:00
unwind Rollup merge of #121438 - coolreader18:wasm32-panic-unwind, r=cuviper 2024-03-11 09:29:34 -07:00