David Carlier
fb84198387
solaris support start.
2024-05-05 21:08:39 +00:00
bors
19a5d475f2
Auto merge of #3565 - RalfJung:libc, r=RalfJung
...
re-organize libc tests
And share some more things across unices
2024-05-05 14:07:43 +00:00
Ralf Jung
f3018409fc
hello: also ensure stderr works
2024-05-05 15:46:13 +02:00
Ralf Jung
aaf5c5e742
move randomness tests into a single file and share the getrandom implementation across unices
2024-05-05 15:46:12 +02:00
Ralf Jung
352b21033a
move things out of libc-misc that have a better home; make libc-misc work on illumos
2024-05-05 15:45:28 +02:00
bors
e1b5e5540f
Auto merge of #3569 - RalfJung:cargo-update, r=RalfJung
...
housekeeping: update dependencies
This also pulls in the new rustc-build-sysroot that hides all the unexpected_cfgs noise.
2024-05-05 13:41:36 +00:00
Ralf Jung
067e33d701
housekeeping: update dependencies
2024-05-05 15:31:13 +02:00
Ralf Jung
5b6df92d54
unix/thread: properly use pthread_t for thread IDs
2024-05-05 15:12:23 +02:00
Ralf Jung
e5597b20c4
sanity-check the pthread offsets against the static initializers
2024-05-05 14:24:21 +02:00
Ralf Jung
ba1a00af15
pthread shims: reorganize field offset handling
2024-05-05 13:35:07 +02:00
David Carlier
b4011a08e8
illumos support.
2024-05-05 12:52:47 +01:00
Ralf Jung
745e3f224c
make ExitProcess Windows-only
2024-05-04 22:50:51 +02:00
Ralf Jung
85e061af8f
fix/extend some comments
2024-05-04 22:48:02 +02:00
Ralf Jung
ef5a574af4
rustc_pull: explain order of operations
2024-05-04 22:44:56 +02:00
Ralf Jung
8db37a3cb5
Merge from rustc
2024-05-04 22:44:01 +02:00
Ralf Jung
89e828889a
Preparing for merge from rustc
2024-05-04 22:28:57 +02:00
Ralf Jung
cdf3f3c202
only show the 'basic API common for this target' message when this is a missing foreign function
2024-05-04 20:56:51 +02:00
bors
d0e77727b1
Auto merge of #3561 - RalfJung:rustup, r=RalfJung
...
Rustup
2024-05-04 17:36:03 +00:00
bors
7eda989cc9
Auto merge of #3557 - RalfJung:getaffinity, r=RalfJung
...
Move sched_getaffinity back to Linux
This reverts commit c1a3f8576ea12b0bed68ad3dedf4069ca3d9816f. The shim isn't actually useful for anything, and it is untested on FreeBSD. On Linux it exists solely because std and num_cpus are trying this before falling back to `sysconf`, but on FreeBSD that's not how they work, so there's no reason I can see to have this stub shim on FreeBSD.
2024-05-04 17:11:02 +00:00
Ralf Jung
a040df7e4e
remove some dead code
2024-05-04 19:09:40 +02:00
Ralf Jung
c6e273cccd
bless and fmt
2024-05-04 18:40:02 +02:00
Ralf Jung
0c989293ce
Merge from rustc
2024-05-04 18:37:35 +02:00
Ralf Jung
adb74ae486
Preparing for merge from rustc
2024-05-04 18:37:23 +02:00
Ralf Jung
9503c41ecc
also test pthread_condattr_getclock
2024-05-04 18:28:37 +02:00
Ralf Jung
86d7dff0b8
factor some pthread offset into constants
2024-05-04 18:08:41 +02:00
Ralf Jung
98bb8acb5b
sync: better error in invalid synchronization primitive ID
2024-05-04 17:52:50 +02:00
Ralf Jung
8e4466497f
interpret, miri: uniform treatments of intrinsics/functions with and without return block
2024-05-04 17:39:29 +02:00
bors
37537d1485
Auto merge of #3559 - RalfJung:weak-extern-static, r=RalfJung
...
add helper function to declare an extern static for a weak symbol
and use it to make `statx` a regular function and get rid of the syscall
2024-05-04 13:22:53 +00:00
Ralf Jung
19aa8a021d
make statx a regular function (so we don't need to support the syscall)
2024-05-04 15:21:08 +02:00
Ralf Jung
823e31d9fa
add helper function to declare an extern static for a weak symbol
2024-05-04 14:42:58 +02:00
bors
3a6faee1e2
Auto merge of #3554 - RalfJung:freebsd, r=RalfJung
...
document unofficially supported OSes
Also tweak the freeBSD testing a bit.
2024-05-04 12:33:22 +00:00
bors
fd15dc391b
Auto merge of #3558 - RalfJung:unsupported, r=RalfJung
...
update 'unsupported' message
Instead of "the interpreter", just say Miri.
Also be a more more clear about what is expected to be supported and what not (Cc https://github.com/rust-lang/miri/issues/2325 ).
2024-05-04 12:07:24 +00:00
Ralf Jung
05e7850d7a
make some tests not need output (so they work on wasm)
2024-05-04 14:07:17 +02:00
Ralf Jung
38598e68c5
document unofficially supported OSes
2024-05-04 14:07:17 +02:00
Ralf Jung
6df585ade5
freebsd: test std threadname and fs APIs
...
also reorder foreign_items to fix the grouping, and reorder the tests_minimal invocations to be more consistent
2024-05-04 14:07:17 +02:00
Ralf Jung
8b4b259da2
update 'unsupported' message
2024-05-04 13:45:54 +02:00
Ralf Jung
e1c3d67d21
Revert "moving out sched_getaffinity interception from linux'shim, FreeBSD supporting it too."
...
This reverts commit c1a3f8576ea12b0bed68ad3dedf4069ca3d9816f.
2024-05-04 13:36:39 +02:00
bors
49cd705189
Auto merge of #3552 - RalfJung:ci, r=RalfJung
...
even out CI runner times
2024-05-04 11:18:42 +00:00
bors
9d4eea1369
Auto merge of #3556 - RalfJung:intrinsics, r=RalfJung
...
move intrinsics tests into dedicated folder
And separate them from "shims" (which are for extern functions we link against).
2024-05-04 10:48:35 +00:00
Ralf Jung
52bf84f3cf
move some minimal targets over to the macOS runner, to even out CI times
2024-05-04 12:43:48 +02:00
Ralf Jung
a4355bbbb1
fix grouping of target-specific LLVM shims
2024-05-04 12:39:37 +02:00
Matthias Krüger
ceb7b5e70e
Rollup merge of #124293 - oli-obk:miri_intrinsic_fallback_body, r=RalfJung
...
Let miri and const eval execute intrinsics' fallback bodies
fixes https://github.com/rust-lang/miri/issues/3397
r? ``@RalfJung``
2024-05-04 12:37:22 +02:00
Ralf Jung
3046dbe7de
move intrinsics implementations and tests into dedicated folder
...
and make them separate from 'shims'
2024-05-04 12:34:42 +02:00
Ralf Jung
57ff16bb5f
rename integer test
2024-05-04 12:30:52 +02:00
Ralf Jung
be874a468b
move available-parallelism tests into shims/ folder
2024-05-04 12:01:18 +02:00
bors
7b57f122b9
Auto merge of #3533 - Luv-Ray:file-descriptors-to-refcount-references, r=RalfJung
...
Make file descriptors into refcount references
fixes #3525
Remove `fn dup` in `trait FileDescription`, define `struct FileDescriptor(Rc<RefCell<dyn FileDescription>>)`, and use `BTreeMap<i32, FileDescriptor>` in `FdTable`.
---
There are some refactors similar to the following form:
```rust
{ // origin:
if let Some(file_descriptor) = this.machine.fds.get_mut(fd) {
// write file_descriptor
this.try_unwrap_io_result(result)
} else {
this.fd_not_found()
}
}
{ // now:
let Some(mut file_descriptor) = this.machine.fds.get_mut(fd) else {
return this.fd_not_found();
};
// write file_descriptor
drop(file_descriptor);
this.try_unwrap_io_result(result)
}
```
The origin form can't compile because as using `RefCell` to get interior mutability, `fn get_mut` return `Option<std::cell::RefMut<'_, dyn FileDescription>>` instead of `Option<&mut dyn FileDescription>` now, and the `deref_mut` on `file_descriptor: RefMut` will cause borrow `this` as mutable more than once at a time.
So this form of refactors and manual drops are are implemented to avoid borrowing `this` at the same time.
2024-05-04 09:52:39 +00:00
Ralf Jung
502ed4965f
show time taken in run_tests_minimal
2024-05-04 11:46:52 +02:00
Ralf Jung
d130eaac1f
speed up Windows runner: don't run GC_STRESS test
2024-05-04 11:46:52 +02:00
Luv-Ray
459c6ce944
Make file descriptors into refcount references
...
take ownership of self and return `io::Result<()>` in `FileDescription::close`
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-05-04 17:24:18 +08:00
bors
705d48cff9
Auto merge of #3551 - RalfJung:getentropy, r=RalfJung
...
macos: use getentropy from libc
This has been added in the mean time.
2024-05-04 09:20:04 +00:00