Commit graph

68 commits

Author SHA1 Message Date
bjorn3
1111a97886 Merge commit 'ba315abda7' into sync_cg_clif-2025-03-30 2025-03-30 15:43:48 +00:00
Trevor Gross
95181ae170 Update compiler-builtins to 0.1.152
Includes the following changes related to unordered atomics:

* Remove element_unordered_atomic intrinsics [1]
* Remove use of `atomic_load_unordered` and undefined behaviour [2]

There are a handful of other small changes, but nothing else
user-visible.

[1]: https://github.com/rust-lang/compiler-builtins/pull/789
[2]: https://github.com/rust-lang/compiler-builtins/pull/790
2025-03-24 00:29:21 +00:00
许杰友 Jieyou Xu (Joe)
e0846806db
Rollup merge of #138082 - thaliaarchi:slice-cfg-not-test, r=thomcc
Remove `#[cfg(not(test))]` gates in `core`

These gates are unnecessary now that unit tests for `core` are in a separate package, `coretests`, instead of in the same files as the source code. They previously prevented the two `core` versions from conflicting with each other.
2025-03-16 09:40:05 +08:00
bjorn3
ae5687e4b0 Fully test the alloc crate through alloctests
For the tests that make use of internal implementation details, we
include the module to test using #[path] in alloctests now.
2025-03-07 19:11:13 +00:00
Thalia Archibald
638b226a6a Remove #[cfg(not(test))] gates in core
These gates are unnecessary now that unit tests for `core` are in a
separate package, `coretests`, instead of in the same files as the
source code. They previously prevented the two `core` versions from
conflicting with each other.
2025-03-06 13:21:59 -08:00
Trevor Gross
7923031e7e Update compiler-builtins to 0.1.151
This enables `f16` builtins for loongarch [1] and adds support for
Cygwin [2].

[1]: https://github.com/rust-lang/compiler-builtins/pull/770
[2]: https://github.com/rust-lang/compiler-builtins/pull/774
2025-03-05 01:35:02 -05:00
Trevor Gross
8b4007a91d Update compiler-builtins to 0.1.150
Includes a change to make a subset of math symbols available on all
platforms [1], and disables `f16` on aarch64 without neon [2].

[1]: https://github.com/rust-lang/compiler-builtins/pull/763
[2]: https://github.com/rust-lang/compiler-builtins/pull/775
2025-03-01 20:02:51 +00:00
Trevor Gross
fb5f804f52 Update compiler-builtins to 0.1.148
Includes `f16` symbols on MIPS [1], updates for `libm` [2], and
reapplies the patch that drops the `public_test_deps!` macro [3].

[1]: https://github.com/rust-lang/compiler-builtins/pull/762
[2]: https://github.com/rust-lang/compiler-builtins/pull/765
[3]: https://github.com/rust-lang/compiler-builtins/pull/766
2025-02-24 07:46:55 +00:00
Trevor Gross
08f1086bf0 Update compiler-builtins to 0.1.147
Removes an ABI hack that used `<2 x i64>` to return `i128` in `xmm0` on
Windows [1].

[1]: https://github.com/rust-lang/compiler-builtins/pull/759
Link: https://github.com/rust-lang/rust/issues/116558
Link: https://github.com/rust-lang/compiler-builtins/issues/758
2025-02-23 06:13:09 +00:00
Trevor Gross
8c1b49d5e9 Use public-dependencies in all sysroot crates
In [1], most dependencies of `std` and other sysroot crates were marked
private, but this did not happen for `alloc` and `test`. Update these
here, marking public standard library crates as the only non-private
dependencies.

[1]: https://github.com/rust-lang/rust/pull/111076
2025-02-21 17:37:03 +00:00
Matthias Krüger
ad92b850c6
Rollup merge of #136714 - tgross35:update-builtins, r=tgross35
Update `compiler-builtins` to 0.1.146

Exposes the error function so we can expose this in the standard library [1].

[1]: https://github.com/rust-lang/compiler-builtins/pull/753
2025-02-10 16:38:26 +01:00
Trevor Gross
38a8302616 Update compiler-builtins to 0.1.146
Exposes the error function so we can expose this in the standard
library [1].

[1]: https://github.com/rust-lang/compiler-builtins/pull/753
2025-02-07 20:58:28 +00:00
bjorn3
cac271fd38 Merge commit '8332329f83' into sync_cg_clif-2025-02-07 2025-02-07 20:58:27 +00:00
Trevor Gross
90fee92fcc Update compiler-builtins to 0.1.145
This includes [1] which is required for LLVM 20.

[1]: https://github.com/rust-lang/compiler-builtins/pull/752
2025-02-04 11:49:01 +00:00
bjorn3
9e5c6a2898 Fix cg_clif testing coretests 2025-01-26 10:26:36 +00:00
Trevor Gross
f6a2db8e1b Update compiler-builtins to 0.1.143
0.1.142 fixes an issue parsing optimization flags, and 0.1.143 changes
`__rust_[ui]128_*` builtins to use a C-safe signature.
2025-01-15 04:02:19 +00:00
Trevor Gross
fcc34b2c44 Update compiler-builtins to 0.1.141
0.1.141 syncs changes from `libm`. Most of the `libm` changes are
testing- or configuration-related.
2025-01-14 18:36:45 +00:00
bjorn3
a94e2d513b Merge commit '918acafef6' into sync_cg_clif-2025-01-05 2025-01-05 15:44:46 +00:00
Trevor Gross
68bd853bb6 Update compiler-builtins to 0.1.140
Nothing significant here, just syncing the following small changes:

- https://github.com/rust-lang/compiler-builtins/pull/727
- https://github.com/rust-lang/compiler-builtins/pull/730
- https://github.com/rust-lang/compiler-builtins/pull/736
- https://github.com/rust-lang/compiler-builtins/pull/737
2024-12-27 22:26:08 +00:00
bjorn3
b3d837afe1 Merge commit '57845a397e' into sync_cg_clif-2024-12-06 2024-12-06 12:10:30 +00:00
bjorn3
c94f759f10 Merge commit '1fa693ca44' into sync_cg_clif-2024-11-09 2024-11-09 13:48:06 +00:00
bjorn3
60f0cd87e8 Merge commit '5b1246bb4b' into sync_cg_clif-2024-11-02 2024-11-02 14:53:30 +00:00
Ralf Jung
a0215d8e46 Re-do recursive const stability checks
Fundamentally, we have *three* disjoint categories of functions:
1. const-stable functions
2. private/unstable functions that are meant to be callable from const-stable functions
3. functions that can make use of unstable const features

This PR implements the following system:
- `#[rustc_const_stable]` puts functions in the first category. It may only be applied to `#[stable]` functions.
- `#[rustc_const_unstable]` by default puts functions in the third category. The new attribute `#[rustc_const_stable_indirect]` can be added to such a function to move it into the second category.
- `const fn` without a const stability marker are in the second category if they are still unstable. They automatically inherit the feature gate for regular calls, it can now also be used for const-calls.

Also, several holes in recursive const stability checking are being closed.
There's still one potential hole that is hard to avoid, which is when MIR
building automatically inserts calls to a particular function in stable
functions -- which happens in the panic machinery. Those need to *not* be
`rustc_const_unstable` (or manually get a `rustc_const_stable_indirect`) to be
sure they follow recursive const stability. But that's a fairly rare and special
case so IMO it's fine.

The net effect of this is that a `#[unstable]` or unmarked function can be
constified simply by marking it as `const fn`, and it will then be
const-callable from stable `const fn` and subject to recursive const stability
requirements. If it is publicly reachable (which implies it cannot be unmarked),
it will be const-unstable under the same feature gate. Only if the function ever
becomes `#[stable]` does it need a `#[rustc_const_unstable]` or
`#[rustc_const_stable]` marker to decide if this should also imply
const-stability.

Adding `#[rustc_const_unstable]` is only needed for (a) functions that need to
use unstable const lang features (including intrinsics), or (b) `#[stable]`
functions that are not yet intended to be const-stable. Adding
`#[rustc_const_stable]` is only needed for functions that are actually meant to
be directly callable from stable const code. `#[rustc_const_stable_indirect]` is
used to mark intrinsics as const-callable and for `#[rustc_const_unstable]`
functions that are actually called from other, exposed-on-stable `const fn`. No
other attributes are required.
2024-10-25 20:31:40 +02:00
Ralf Jung
e1c09ec9a5 fix cranelift CI 2024-09-29 07:32:08 +02:00
bjorn3
b40fe1ee28 Merge commit '6d35b4c9a0' into sync_cg_clif-2024-09-22 2024-09-23 11:20:46 +00:00
bjorn3
af7ea3135d Merge commit '69b3f5a426' into sync_cg_clif-2024-08-09 2024-08-09 17:18:46 +00:00
bjorn3
9ec6a02ab3 Merge commit '49cd5dd454' into sync_cg_clif-2024-06-30 2024-06-30 11:28:14 +00:00
Nicholas Nethercote
7e7da49f2a Update a cranelift patch file for formatting changes.
PR #125443 will reformat all the use declarations in the repo. This
would break a patch kept in `rustc_codegen_cranelift` that gets applied
to `library/std/src/sys/pal/windows/rand.rs`.

So this commit formats the use declarations in
`library/std/src/sys/pal/windows/rand.rs` in advance of #125443 and
updates the patch file accordingly.

The motivation is that #125443 is a huge change and we want to get
fiddly little changes like this out of the way so it can be nothing more
than an `x fmt --all`.
2024-06-12 08:52:40 +10:00
bjorn3
75f8bdbca4 Merge commit '3270432f4b' into sync_cg_clif-2024-05-13 2024-05-13 13:26:33 +00:00
bjorn3
3d682cfb66 Merge commit 'de5d652373' into sync_cg_clif-2024-04-23 2024-04-23 09:37:28 +00:00
Chris Denton
5b024d6550
Cranelift: Revert raw-dylib for Windows futex APIs 2024-04-16 15:53:35 +00:00
bjorn3
2ab4334a96 Merge commit '89f54caacf' into sync_cg_clif-2024-04-11 2024-04-11 10:42:48 +00:00
bjorn3
987ed345af Merge commit '09fae60a86' into sync_cg_clif-2024-03-28 2024-03-28 11:43:35 +00:00
bjorn3
6697186f59 Merge commit '4cf4ffc6ba' into sync_cg_clif-2024-03-16 2024-03-16 17:23:11 +00:00
bjorn3
8fb8b08716 Merge commit '54cbb6e753' into sync_cg_clif-2024-03-08 2024-03-08 20:41:29 +00:00
Chris Denton
843eaf2e71
Cranelift: Don't use raw-dylib in std 2024-02-25 10:22:34 -03:00
bjorn3
37018026f0 Merge commit '3e50cf6502' into sync_cg_clif-2024-01-26 2024-01-26 18:33:45 +00:00
David Tolnay
97a720b39b
Rebase slice_group_by stabilization PR 2024-01-25 22:20:59 -08:00
bjorn3
d5c38ded26 Merge commit '3a9bf72932' into sync_cg_clif-2023-12-19 2023-12-19 12:46:39 +00:00
bjorn3
d186b49460 Merge commit 'c84d1871dc' into sync_cg_clif-2023-11-10 2023-11-10 11:30:51 +00:00
bjorn3
a9b21bb727 Merge commit 'dde58803fd' into sync_cg_clif-2023-10-29 2023-10-29 20:30:50 +00:00
bjorn3
484bc7fc88 Merge commit '93a5433f17' into sync_cg_clif-2023-10-24 2023-10-24 12:22:23 +00:00
bjorn3
e07f47b6c5 Merge commit 'c07d1e2f88' into sync_cg_clif-2023-10-21 2023-10-21 19:54:51 +00:00
bjorn3
169055f2ff Merge commit '81dc066758' into sync_cg_clif-2023-10-09 2023-10-09 08:52:46 +00:00
bjorn3
521ed6e308 Merge commit 'dda103b1e3' into sync_cg_clif-2023-09-06 2023-09-06 18:51:03 +00:00
bjorn3
37751893cc Merge commit '8f9ac9c22d' into sync_cg_clif-2023-08-09 2023-08-09 18:20:12 +00:00
bjorn3
36708123c1 Merge commit '1eded3619d' into sync_cg_clif-2023-07-22 2023-07-22 13:32:34 +00:00
bjorn3
82b497286d Merge commit '8830dccd1d' into sync_cg_clif-2023-06-15 2023-06-15 17:56:01 +00:00
Pietro Albini
a988dc2711
remove patch from cranelift backend to ignore unwinding tests 2023-06-13 15:53:26 +02:00
bjorn3
fce629d2e9 Merge commit 'dec0daa8f6' into sync_cg_clif-2023-03-15 2023-03-15 14:41:48 +00:00