Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0d90d47
TRPL: more backward-compatible Edition changes
chriskrycho Jan 21, 2025
9cfc420
TRPL: integrate edits to Chapter 17
chriskrycho Jan 21, 2025
4d1c16c
Make the wasm_c_abi future compat warning a hard error
bjorn3 Dec 6, 2024
49c3aaa
Add test
bjorn3 Jan 9, 2025
1f6517b
Move `std::io::pipe` code into its own file
tbu- Jan 17, 2025
f770f39
Update `std::io::{pipe, PipeReader, PipeWriter}` docs the new location
tbu- Jan 17, 2025
84c8015
Add new target for supporting Neutrino QNX 6.1 with `io-socket` netwo…
flba-eb Nov 28, 2024
efe53dd
Add support for QNX 7.1 with io-sock on x64
flba-eb Nov 29, 2024
62661f2
Move common code to mod nto_qnx
flba-eb Nov 30, 2024
3f045c9
add nto80 x86-64 and aarch64 target
AkhilTThomas Dec 6, 2024
46a0333
Update documentation to include QNX 8.0
flba-eb Dec 10, 2024
0462826
Review nto-qnx.md.
jonathanpallant Jan 13, 2025
2444adf
fix(libtest): Deprecate '--logfile'
epage Dec 13, 2024
8eebbba
ci.py: check the return code in `run-local`
cuviper Jan 23, 2025
492d985
extract principal MIR dump function
lqd Jan 24, 2025
3631c15
use more explicit MIR dumping process
lqd Jan 24, 2025
6baa65e
switch polonius MIR dump to HTML
lqd Jan 24, 2025
82c0168
fix terminator edges comments
lqd Jan 24, 2025
09fb70a
add CFG to polonius MIR dump
lqd Jan 24, 2025
8e74ff4
Rollup merge of #133631 - flba-eb:add_nto_qnx71_iosock_support, r=wor…
matthiaskrgr Jan 26, 2025
9004ed7
Rollup merge of #133951 - bjorn3:wasm_c_abi_lint_hard_error, r=workin…
matthiaskrgr Jan 26, 2025
e31e3cd
Rollup merge of #134283 - epage:logfile, r=Amanieu
matthiaskrgr Jan 26, 2025
e50417e
Rollup merge of #135635 - tbu-:pr_io_pipe, r=joboet
matthiaskrgr Jan 26, 2025
628f7fa
Rollup merge of #135842 - chriskrycho:trpl-2024-edition-more, r=ehuss
matthiaskrgr Jan 26, 2025
780fdb5
Rollup merge of #135953 - cuviper:ci-run-local-fail, r=Kobzol
matthiaskrgr Jan 26, 2025
4374b3f
Rollup merge of #136031 - lqd:polonius-debugger-episode-1, r=compiler…
matthiaskrgr Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add support for QNX 7.1 with io-sock on x64
Signed-off-by: Florian Bartels <[email protected]>
  • Loading branch information
flba-eb committed Jan 24, 2025
commit efe53ddd587333a405fcb95d78a72696932275cd
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1965,6 +1965,7 @@ supported_targets! {
("aarch64-unknown-nto-qnx710", aarch64_unknown_nto_qnx710),
("aarch64-unknown-nto-qnx710_iosock", aarch64_unknown_nto_qnx710_iosock),
("x86_64-pc-nto-qnx710", x86_64_pc_nto_qnx710),
("x86_64-pc-nto-qnx710_iosock", x86_64_pc_nto_qnx710_iosock),
("i586-pc-nto-qnx700", i586_pc_nto_qnx700),

("aarch64-unknown-linux-ohos", aarch64_unknown_linux_ohos),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions};

pub(crate) fn target() -> Target {
let mut target = super::x86_64_pc_nto_qnx710::target();
target.options.env = "nto71_iosock".into();
target.options.pre_link_args =
TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[
"-Vgcc_ntox86_64_cxx",
get_iosock_param(),
]);
target
}

// When using `io-sock` on QNX, we must add a search path for the linker so
// that it prefers the io-sock version.
// The path depends on the host, i.e. we cannot hard-code it here, but have
// to determine it when the compiler runs.
// When using the QNX toolchain, the environment variable QNX_TARGET is always set.
// More information:
// https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.io_sock/topic/migrate_app.html
fn get_iosock_param() -> &'static str {
let target_dir =
std::env::var("QNX_TARGET").unwrap_or_else(|_| "PLEASE_SET_ENV_VAR_QNX_TARGET".into());
let linker_param = format!("-L{target_dir}/x86_64/io-sock/lib");

linker_param.leak()
}
2 changes: 1 addition & 1 deletion library/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ test = true
level = "warn"
check-cfg = [
'cfg(bootstrap)',
'cfg(target_arch, values("xtensa", "aarch64-unknown-nto-qnx710_iosock"))',
'cfg(target_arch, values("xtensa", "aarch64-unknown-nto-qnx710_iosock", "x86_64-pc-nto-qnx710_iosock"))',
'cfg(target_env, values("nto71_iosock"))',
# std use #[path] imports to portable-simd `std_float` crate
# and to the `backtrace` crate which messes-up with Cargo list
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/src/core/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub struct Finder {
const STAGE0_MISSING_TARGETS: &[&str] = &[
// just a dummy comment so the list doesn't get onelined
"aarch64-unknown-nto-qnx710_iosock",
"x86_64-pc-nto-qnx710_iosock",
];

/// Minimum version threshold for libstdc++ required when using prebuilt LLVM
Expand Down
3 changes: 2 additions & 1 deletion src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ target | std | host | notes
[`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? | | WebAssembly
[`x86_64-apple-tvos`](platform-support/apple-tvos.md) | ✓ | | x86 64-bit tvOS
[`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | x86 64-bit Apple WatchOS simulator
[`x86_64-pc-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS |
[`x86_64-pc-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS with default network stack (io-pkt) |
[`x86_64-pc-nto-qnx710_iosock`](platform-support/nto-qnx.md) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS with new network stack (io-sock) |
[`x86_64-unikraft-linux-musl`](platform-support/unikraft-linux-musl.md) | ✓ | | 64-bit Unikraft with musl 1.2.3
`x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
Expand Down
11 changes: 6 additions & 5 deletions src/doc/rustc/src/platform-support/nto-qnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ Currently, the following QNX Neutrino versions and compilation targets are suppo

| QNX Neutrino Version | Target Architecture | Full support | `no_std` support |
|----------------------|---------------------|:------------:|:----------------:|
| 7.1 with io-pkt | AArch64 | ✓ | ✓ |
| 7.1 with io-sock | AArch64 | ✓ | ✓ |
| 7.1 | x86_64 | ✓ | ✓ |
| 7.0 | AArch64 | ? | ✓ |
| 7.0 | x86 | | ✓ |
| 7.1 with io-pkt | AArch64 | ✓ | ✓ |
| 7.1 with io-sock | AArch64 | ? | ✓ |
| 7.1 with io-pkt | x86_64 | ✓ | ✓ |
| 7.1 with io-sock | x86_64 | ? | ✓ |
| 7.0 | AArch64 | ? | ✓ |
| 7.0 | x86 | | ✓ |

On QNX 7.0 and 7.1, `io-pkt` is used as network stack by default. QNX 7.1 includes
the optional network stack `io-sock`.
Expand Down
3 changes: 3 additions & 0 deletions tests/assembly/targets/targets-elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@
//@ revisions: x86_64_pc_nto_qnx710
//@ [x86_64_pc_nto_qnx710] compile-flags: --target x86_64-pc-nto-qnx710
//@ [x86_64_pc_nto_qnx710] needs-llvm-components: x86
//@ revisions: x86_64_pc_nto_qnx710_iosock
//@ [x86_64_pc_nto_qnx710_iosock] compile-flags: --target x86_64-pc-nto-qnx710_iosock
//@ [x86_64_pc_nto_qnx710_iosock] needs-llvm-components: x86
//@ revisions: x86_64_pc_solaris
//@ [x86_64_pc_solaris] compile-flags: --target x86_64-pc-solaris
//@ [x86_64_pc_solaris] needs-llvm-components: x86
Expand Down