Skip to content

QNX target renaming#158449

Open
jonathanpallant wants to merge 5 commits into
rust-lang:mainfrom
ferrocene:rename-qnx-targets
Open

QNX target renaming#158449
jonathanpallant wants to merge 5 commits into
rust-lang:mainfrom
ferrocene:rename-qnx-targets

Conversation

@jonathanpallant

@jonathanpallant jonathanpallant commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

View all comments

This PR renames two QNX targets:

  • aarch64-unknown-nto-qnx800 becomes simply aarch64-unknown-qnx
  • x86_64-pc-nto-qnx800 becomes simply x86_64-pc-qnx

In addition:

  • references to QNX OS and QNX Neutrino RTOS are replaced with QNX SDP for uniformity
  • the spec::base::nto_qnx module is renamed to base::spec::qnx_sdp to match the above
  • the target_os of the QNX SDP 8.0 targets is changed to qnx to match the target name
  • a lot of code is then touched to handle any(target_os = "nto", target_os = "qnx")

I think it's worth noting that QNX Software Development Platform is the build environment that you download and install, and you can use it to create a custom run-time environment. In SDP 7.x the run-time environment was based on QNX Neutrino 7.x, but in SDP 8.0 the run-time environment is based on QNX OS 8.0. I think it was weird to users to see the two different run-time environments in the docs, and referring to the build environment just seems to make more sense anyway because that's what users install, it's where the headers live, and ultimately it's what the toolchain will care about.

The new target names match those reported by clang running on the self-hosted QNX Developer Desktop.

$ clang --version
QNX clang version 21.1.3
Target: x86_64-pc-qnx
Thread model: posix
InstalledDir: /usr/bin

Once the compiler knows about the new target names, libc, backtrace and cc-rs can be updated to match, and then building libstd for the new targets can be fixed. This rename will cause a bit of churn, but it seemed important to get it changed before anyone tries to finish libstd support for QNX SDP 8.0 (it's currently noted as "in-progress"). It's also Tier 3 so we have fairly broad latitude to do this I think, and aligning with QNX's build of clang just makes sense.

With these changes I can run:

$ ./x build library/std --stage 2 --target x86_64-pc-nto-qnx710,aarch64-unknown-nto-qnx710,x86_64-pc-nto-qnx710_iosock,aarch64-unknown-nto-qnx710_iosock,aarch64-unknown-nto-qnx700
$ ./x build library/core --stage 1 --target x86_64-pc-qnx,aarch64-unknown-qnx

The QNX SDP 7.x targets retain their old names, and their target_os = "nto", target_env = "qnx710" configuration, to avoid breakage.

@rustbot

rustbot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

These commits modify compiler targets.
(See the Target Tier Policy.)

miri is developed in its own repository. If possible, consider making this change to rust-lang/miri instead.

cc @rust-lang/miri

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 26, 2026
@rustbot

rustbot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from Darksonn, JohnTitor, Mark-Simulacrum, clarfonthey, jhpratt

@rustbot rustbot added T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jun 26, 2026
@jonathanpallant

Copy link
Copy Markdown
Contributor Author

Fixing those stderr failures now.

@rustbot

This comment has been minimized.

@workingjubilee workingjubilee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a comment in some file explaining that "SDP" implies, functionally, both "the C toolchain" and "the libc"? Or a clarification on that relationship, if that's off? Perhaps one of the std::sys files or on the platform support page? I think it is implied by the current text but with more emphasis on the term it feels a bit more ambiguous, ironically, via repetition.

I skimmed over things and everything seems fine otherwise, though it may benefit from another scan. Mostly just nits and me going "that's odd... eh, doesn't matter, right?"

View changes since this review

Comment thread tests/rustdoc-html/doc-cfg/all-targets.rs
Comment thread compiler/rustc_target/src/spec/targets/aarch64_unknown_qnx.rs
Comment thread src/doc/rustc/src/platform-support/nto-qnx.md Outdated
Comment thread library/std/src/sys/net/connection/socket/mod.rs Outdated
Comment thread src/doc/rustc/src/platform-support/nto-qnx.md Outdated
@rust-bors

This comment has been minimized.

@jonathanpallant

Copy link
Copy Markdown
Contributor Author

Can we get a comment in some file explaining that "SDP" implies, functionally, both "the C toolchain" and "the libc"? Or a clarification on that relationship, if that's off? Perhaps one of the std::sys files or on the platform support page? I think it is implied by the current text but with more emphasis on the term it feels a bit more ambiguous, ironically, via repetition.

How about if I take the text from the PR description and put it on the QNX target doc page?

But you are right, the SDP contains a C toolchain, libc, other libraries, headers - all the ingredients to build your own OS image.

@workingjubilee

Copy link
Copy Markdown
Member

How about if I take the text from the PR description and put it on the QNX target doc page?

That is absolutely fine!

@JohnTitor

Copy link
Copy Markdown
Member

r? workingjubilee

@rustbot

rustbot commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

workingjubilee is currently at their maximum review capacity.
They may take a while to respond.

- aarch64-unknown-nto-qnx800 becomes simply aarch64-unknown-qnx
- x86_64-pc-nto-qnx800 becomes simply x86_64-pc-qnx
- references to QNX OS and QNX Neutrino RTOS are replaced with QNX SDP for uniformity
- various nto_qnx modules are named to qnx_sdp to match the above

The new target names are more consistent with those used by the QNX SDP 8.0 toolchain, and reflect a level on ongoing API stability similar to that for macOS and Linux (which simply have minimum supported versions record for their targets).

Once the compiler knows about the new target names, libc and backtrace can be updated to match, and then building libstd for the new targets can be fixed.

With these changes I can run:

```console
$ ./x build library/std --stage 2 --target x86_64-pc-nto-qnx710,aarch64-unknown-nto-qnx710,x86_64-pc-nto-qnx710_iosock,aarch64-unknown-nto-qnx710_iosock,aarch64-unknown-nto-qnx700
$ ./x build library/core --stage 1 --target x86_64-pc-qnx,aarch64-unknown-qnx
```
The name of the OS had changed, so the tests needed updating
- Now explains what SDP is
- Moves sections into a more useful order
- Re-wrap long blocks of text
@jonathanpallant

Copy link
Copy Markdown
Contributor Author

rebased

@rustbot

rustbot commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Just in case we were deliberately pairing up these OSes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants