Skip to content

Commit d34f1f9

Browse files
committed
Auto merge of #152420 - tgross35:update-builtins, r=tgross35
compiler-builtins subtree update Subtree update of `compiler-builtins` to rust-lang/compiler-builtins@6a67a9f. Created using https://github.com/rust-lang/josh-sync. r? @ghost
2 parents 7b25457 + 8cd47ad commit d34f1f9

61 files changed

Lines changed: 867 additions & 389 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

library/compiler-builtins/.github/workflows/main.yaml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,14 @@ jobs:
7070
os: ubuntu-24.04
7171
- target: powerpc64le-unknown-linux-gnu
7272
os: ubuntu-24.04
73-
- target: powerpc64le-unknown-linux-gnu
74-
os: ubuntu-24.04-ppc64le
73+
# - target: powerpc64le-unknown-linux-gnu
74+
# os: ubuntu-24.04-ppc64le
75+
# # FIXME(rust#151807): remove once PPC builds work again.
76+
# channel: nightly-2026-01-23
7577
- target: riscv64gc-unknown-linux-gnu
7678
os: ubuntu-24.04
77-
- target: s390x-unknown-linux-gnu
78-
os: ubuntu-24.04-s390x
79+
# - target: s390x-unknown-linux-gnu
80+
# os: ubuntu-24.04-s390x
7981
- target: thumbv6m-none-eabi
8082
os: ubuntu-24.04
8183
- target: thumbv7em-none-eabi
@@ -228,7 +230,27 @@ jobs:
228230
# poorly with build scripts)
229231
cargo build -p compiler_builtins -p libm \
230232
--target etc/thumbv7em-none-eabi-renamed.json \
231-
-Zbuild-std=core
233+
-Zbuild-std=core \
234+
-Zjson-target-spec
235+
236+
# FIXME: move this target to test job once https://github.com/rust-lang/rust/pull/150138 merged.
237+
build-thumbv6k:
238+
name: Build thumbv6k
239+
runs-on: ubuntu-24.04
240+
timeout-minutes: 10
241+
steps:
242+
- uses: actions/checkout@v4
243+
- name: Install Rust
244+
run: |
245+
rustup update nightly --no-self-update
246+
rustup default nightly
247+
rustup component add rust-src
248+
- uses: Swatinem/rust-cache@v2
249+
- run: |
250+
cargo build -p compiler_builtins -p libm \
251+
--target etc/thumbv6-none-eabi.json \
252+
-Zbuild-std=core \
253+
-Zjson-target-spec
232254
233255
benchmarks:
234256
name: Benchmarks
@@ -354,6 +376,7 @@ jobs:
354376
needs:
355377
- benchmarks
356378
- build-custom
379+
- build-thumbv6k
357380
- clippy
358381
- extensive
359382
- miri

library/compiler-builtins/.github/workflows/rustc-pull.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
# Run at 04:00 UTC every Monday and Thursday
88
- cron: '0 4 * * 1,4'
99

10+
env:
11+
JOSH_SYNC_VERBOSE: true
12+
1013
jobs:
1114
pull:
1215
if: github.repository == 'rust-lang/compiler-builtins'

library/compiler-builtins/Cargo.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,39 @@ exclude = [
3131
"compiler-builtins",
3232
]
3333

34+
[workspace.dependencies]
35+
anyhow = "1.0.101"
36+
assert_cmd = "2.1.2"
37+
cc = "1.2.55"
38+
compiler_builtins = { path = "builtins-shim", default-features = false }
39+
criterion = { version = "0.6.0", default-features = false, features = ["cargo_bench_support"] }
40+
getrandom = "0.3.4"
41+
gmp-mpfr-sys = { version = "1.6.8", default-features = false }
42+
gungraun = "0.17.0"
43+
heck = "0.5.0"
44+
indicatif = { version = "0.18.3", default-features = false }
45+
libm = { path = "libm", default-features = false }
46+
libm-macros = { path = "crates/libm-macros" }
47+
libm-test = { path = "libm-test", default-features = false }
48+
libtest-mimic = "0.8.1"
49+
musl-math-sys = { path = "crates/musl-math-sys" }
50+
no-panic = "0.1.35"
51+
object = { version = "0.37.3", features = ["wasm"] }
52+
panic-handler = { path = "crates/panic-handler" }
53+
paste = "1.0.15"
54+
proc-macro2 = "1.0.106"
55+
quote = "1.0.44"
56+
rand = "0.9.2"
57+
rand_chacha = "0.9.0"
58+
rand_xoshiro = "0.7"
59+
rayon = "1.11.0"
60+
regex = "1.12.3"
61+
rug = { version = "1.28.1", default-features = false, features = ["float", "integer", "std"] }
62+
rustc_apfloat = "0.2.3"
63+
serde_json = "1.0.149"
64+
syn = "2.0.114"
65+
tempfile = "3.24.0"
66+
3467
[profile.release]
3568
panic = "abort"
3669

@@ -51,6 +84,7 @@ codegen-units = 1
5184
lto = "fat"
5285

5386
[profile.bench]
87+
codegen-units = 1
5488
# Required for gungraun
5589
debug = true
5690
strip = false

library/compiler-builtins/builtins-shim/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# manifest that is identical except for the `core` dependency and forwards
88
# to the same sources, which acts as the `compiler-builtins` Cargo entrypoint
99
# for out of tree testing
10+
#
11+
# Ideally we can eventually replace this with a patch in the workspace
12+
# manifest <https://github.com/rust-lang/cargo/issues/4648>.
1013

1114
[package]
1215
name = "compiler_builtins"
@@ -33,7 +36,7 @@ doctest = false
3336
test = false
3437

3538
[build-dependencies]
36-
cc = { optional = true, version = "1.2" }
39+
cc = { version = "1.2", optional = true }
3740

3841
[features]
3942
default = ["compiler-builtins"]

library/compiler-builtins/builtins-test/Cargo.toml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@ publish = false
66
license = "MIT AND Apache-2.0 WITH LLVM-exception AND (MIT OR Apache-2.0)"
77

88
[dependencies]
9+
compiler_builtins = { workspace = true, features = ["unstable-public-internals"] }
10+
911
# For fuzzing tests we want a deterministic seedable RNG. We also eliminate potential
1012
# problems with system RNGs on the variety of platforms this crate is tested on.
1113
# `xoshiro128**` is used for its quality, size, and speed at generating `u32` shift amounts.
12-
rand_xoshiro = "0.7"
14+
rand_xoshiro.workspace = true
15+
1316
# To compare float builtins against
14-
rustc_apfloat = "0.2.3"
15-
# Really a dev dependency, but dev dependencies can't be optional
16-
gungraun = { version = "0.17.0", optional = true }
17+
rustc_apfloat.workspace = true
1718

18-
[dependencies.compiler_builtins]
19-
path = "../builtins-shim"
20-
default-features = false
21-
features = ["unstable-public-internals"]
19+
# Really a dev dependency, but dev dependencies can't be optional
20+
gungraun = { workspace = true, optional = true }
2221

2322
[dev-dependencies]
24-
criterion = { version = "0.6.0", default-features = false, features = ["cargo_bench_support"] }
25-
paste = "1.0.15"
23+
criterion.workspace = true
24+
paste.workspace = true
2625

2726
[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
2827
test = { git = "https://github.com/japaric/utest" }

library/compiler-builtins/ci/docker/aarch64-unknown-linux-gnu/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
ARG IMAGE=ubuntu:25.04
1+
ARG IMAGE=ubuntu:25.10
22
FROM $IMAGE
33

44
RUN apt-get update && \
55
apt-get install -y --no-install-recommends \
66
gcc libc6-dev ca-certificates \
77
gcc-aarch64-linux-gnu m4 make libc6-dev-arm64-cross \
8-
qemu-user-static
8+
qemu-user
99

1010
ENV TOOLCHAIN_PREFIX=aarch64-linux-gnu-
1111
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$TOOLCHAIN_PREFIX"gcc \
12-
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=qemu-aarch64-static \
12+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=qemu-aarch64 \
1313
AR_aarch64_unknown_linux_gnu="$TOOLCHAIN_PREFIX"ar \
1414
CC_aarch64_unknown_linux_gnu="$TOOLCHAIN_PREFIX"gcc \
1515
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu \

library/compiler-builtins/ci/docker/arm-unknown-linux-gnueabi/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
ARG IMAGE=ubuntu:25.04
1+
ARG IMAGE=ubuntu:25.10
22
FROM $IMAGE
33

44
RUN apt-get update && \
55
apt-get install -y --no-install-recommends \
66
gcc libc6-dev ca-certificates \
7-
gcc-arm-linux-gnueabi libc6-dev-armel-cross qemu-user-static
7+
gcc-arm-linux-gnueabi libc6-dev-armel-cross qemu-user
88

99
ENV TOOLCHAIN_PREFIX=arm-linux-gnueabi-
1010
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER="$TOOLCHAIN_PREFIX"gcc \
11-
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER=qemu-arm-static \
11+
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER=qemu-arm \
1212
AR_arm_unknown_linux_gnueabi="$TOOLCHAIN_PREFIX"ar \
1313
CC_arm_unknown_linux_gnueabi="$TOOLCHAIN_PREFIX"gcc \
1414
QEMU_LD_PREFIX=/usr/arm-linux-gnueabi \

library/compiler-builtins/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
ARG IMAGE=ubuntu:25.04
1+
ARG IMAGE=ubuntu:25.10
22
FROM $IMAGE
33

44
RUN apt-get update && \
55
apt-get install -y --no-install-recommends \
66
gcc libc6-dev ca-certificates \
7-
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
7+
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user
88

99
ENV TOOLCHAIN_PREFIX=arm-linux-gnueabihf-
1010
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER="$TOOLCHAIN_PREFIX"gcc \
11-
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER=qemu-arm-static \
11+
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER=qemu-arm \
1212
AR_arm_unknown_linux_gnueabihf="$TOOLCHAIN_PREFIX"ar \
1313
CC_arm_unknown_linux_gnueabihf="$TOOLCHAIN_PREFIX"gcc \
1414
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \

library/compiler-builtins/ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
ARG IMAGE=ubuntu:25.04
1+
ARG IMAGE=ubuntu:25.10
22
FROM $IMAGE
33

44
RUN apt-get update && \
55
apt-get install -y --no-install-recommends \
66
gcc libc6-dev ca-certificates \
7-
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static
7+
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user
88

99
ENV TOOLCHAIN_PREFIX=arm-linux-gnueabihf-
1010
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER="$TOOLCHAIN_PREFIX"gcc \
11-
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER=qemu-arm-static \
11+
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER=qemu-arm \
1212
AR_armv7_unknown_linux_gnueabihf="$TOOLCHAIN_PREFIX"ar \
1313
CC_armv7_unknown_linux_gnueabihf="$TOOLCHAIN_PREFIX"gcc \
1414
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf \

library/compiler-builtins/ci/docker/i586-unknown-linux-gnu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG IMAGE=ubuntu:25.04
1+
ARG IMAGE=ubuntu:25.10
22
FROM $IMAGE
33

44
RUN apt-get update && \

0 commit comments

Comments
 (0)