Skip to content

Make Trusty targets single threaded - #165712

Closed
randomPoison wants to merge 1 commit into
rust-lang:mainfrom
randomPoison:trusty-single-threaded
Closed

randomPoison wants to merge 1 commit into
rust-lang:mainfrom
randomPoison:trusty-single-threaded

Conversation

@randomPoison

@randomPoison randomPoison commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

#158782 introduced compile-time checks to verify that targets using the no-thread implementation of sync primitives are actually marked single-threaded. This broke the Trusty targets, which were not marked single-threaded. Trusty userspace doesn't have threads, so this PR updates the target definitions to properly mark them single-threaded.

@ahomescu please look this over and double check that this target change is correct.

Fixes #165596

LLM Usage Disclosure

I used an LLM in order to prepare this PR:

  • An LLM found the target configuration option for marking a target single-threaded.
  • An LLM found the PR that introduced the breakage so I could confirm what the fix should be.

@rustbot

rustbot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 9, 2026
@rustbot

rustbot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

r? @oli-obk

rustbot has assigned @oli-obk.
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: compiler
  • compiler expanded to 79 candidates
  • Random selection from 20 candidates

@workingjubilee

workingjubilee commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

I checked the platform support page and it suggests these targets support threads: https://github.com/rust-lang/rust/blob/main/src/doc/rustc/src/platform-support/trusty.md

Can the platform document be updated to reflect the reality here? "It supports threads" when the support is fake is misleading.

@randomPoison

Copy link
Copy Markdown
Contributor Author

Ah yeah you're right, that document is wrong :/ We should get that updated as well.

Also from some discussion with @ahomescu I'm not sure this is the right fix, we may need Trusty to have atomics support for the purpose of shared memory IPC. The better fix might be to implement the sync primitives via pthreads, which have a stubbed implementation on Trusty. I'm going to close this PR, but we can re-open it if it turns out that marking the targets single-threaded is the right solution.

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 9, 2026
@randomPoison

Copy link
Copy Markdown
Contributor Author

@workingjubilee Oh, I think we both misread the target docs, it says "has limited support that excludes things like filesystem access, network I/O, and spawning processes/threads."

@workingjubilee

Copy link
Copy Markdown
Member

...oops! Sorry about that, lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

*-trusty targets build failed

4 participants