Repository navigation
Make Trusty targets single threaded - #165712
randomPoison wants to merge 1 commit into
Conversation
|
These commits modify compiler targets. |
|
r? @oli-obk rustbot has assigned @oli-obk. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
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. |
|
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. |
|
@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." |
|
...oops! Sorry about that, lol. |
#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: