std: add platform support for hexagon-unknown-qurt#152084
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
791d71f to
3201966
Compare
|
This PR depends on a newer version of the |
This comment has been minimized.
This comment has been minimized.
You need |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
The commit I need - rust-lang/libc@9934c04 is not yet tagged/released. Or rather there is a |
This comment has been minimized.
This comment has been minimized.
3201966 to
5adcafb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ah - I see now that it appears in |
This comment has been minimized.
This comment has been minimized.
5adcafb to
caab9c9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
caab9c9 to
3749f50
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
gentle ping @joboet |
|
LGTM once |
53a33f8 to
c526632
Compare
This comment has been minimized.
This comment has been minimized.
Fixed |
|
Looks like |
c526632 to
1325ffa
Compare
Fixed, thanks |
|
ping @joboet |
|
Sorry for the delay, I was taking a bit of a break from reviewing. Could you provide a bit more context on QuRT? It looks like quite a lot of UNIX stuff is stubbed out here. How much UNIX-compatibility does QuRT actually provide? I'm asking because we have some similar UNIX-adjacent targets (e.g. Hermit, TEEOS) that don't list UNIX as their target family and instead just reuse the UNIX code in @rustbot label +I-libs-nominated |
QuRT is a proprietary RTOS for Hexagon, ARM, RISC-V architectures that is usually focused on embedded DSP/uC devices without a direct storage device, without an interactive terminal/shell/UART. It has memory-protected processes, some POSIX capability like pthreads/mutexes. QuRT lacks SysV IPC. QuRT provides an indirect access to a filesystem via calls to some-other-SoC-node-with-a-disk. But yeah - I'm totally fine w/redoing this PR to avoid touching UNIX and making it look more like hermit/teeos. Will take a look and update the PR. |
1325ffa to
1bd87eb
Compare
|
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb These commits modify compiler targets. |
|
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. |
Can you provide some more details? By expanding the "etc.". For example time and randomness aren't covered by your list. |
I've updated the PR description like so:
|
| @@ -114,7 +114,7 @@ pub(crate) fn get_result_from_exit_code( | |||
| Some(TR_OK) => TestResult::TrOk, | |||
| #[cfg(windows)] | |||
| Some(STATUS_FAIL_FAST_EXCEPTION) => TestResult::TrFailed, | |||
| #[cfg(unix)] | |||
| #[cfg(all(unix, not(target_os = "qurt")))] | |||
There was a problem hiding this comment.
So, is qurt unix or not for cfg purposes? This seems to not be consistent throughout the PR
There was a problem hiding this comment.
Sorry, I'll make it consistent.
| @@ -1,6 +1,11 @@ | |||
| #![forbid(unsafe_op_in_unsafe_fn)] | |||
|
|
|||
| cfg_select! { | |||
| // QuRT uses unsupported pipes since it doesn't support process spawning | |||
| target_os = "qurt" => { | |||
There was a problem hiding this comment.
This is no longer needed since qurt is no longer unix.
|
The conclusion from today's libs meeting was that this target is (given what we're seeing) Not Unix, but properly defining what is unix is best left for a refactor of the cfgs we expose |
aa6be17 to
45894d0
Compare
This comment has been minimized.
This comment has been minimized.
45894d0 to
2db6d1f
Compare
This comment has been minimized.
This comment has been minimized.
Remove unix family from hexagon-unknown-qurt target spec and instead explicitly opt into unix implementations where applicable, following the pattern used by similar unix-adjacent targets. The target uses the unix PAL and explicitly selects unix implementations for the supported features. Modules that remain unsupported for qurt: process spawning, networking and pipes.
Update documentation with details about how to leverage qurt, now that there's some level of libstd support
2db6d1f to
091e154
Compare
View all comments
QuRT is not a unix target but provides POSIX-compatible threading, file I/O, and synchronization APIs. This implementation does not declare unix as a target family. Instead, it explicitly opts into the unix PAL and selects unix-based implementations for individual subsystems where QuRT's POSIX layer is sufficient.
Supported: alloc, threading, mutex, condvar, rwlock, once, thread parking, TLS, file system, file descriptors, stdio, I/O slices, I/O errors, is_terminal, env, paths, time, exit, personality/unwinding, backtrace
Stubbed; returns Err: process spawning, networking, pipes, hostname
Stubbed; returns empty: command-line args
Stubbed; panics: random
Platform modules: