Skip to content

Commit 863c5b1

Browse files
committed
now fix it
1 parent 7af6983 commit 863c5b1

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/main.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,17 @@ jobs:
196196
- run: cargo clippy --workspace --all-targets
197197

198198
build-custom:
199-
name: Custom target
199+
name: Build custom target
200200
runs-on: ubuntu-24.04
201201
timeout-minutes: 10
202202
steps:
203203
- uses: actions/checkout@v4
204204
- name: Install Rust
205205
run: rustup update nightly --no-self-update && rustup default nightly
206206
- uses: Swatinem/rust-cache@v2
207-
- run: cargo build -p compiler_builtins -p libm --target etc/thumbv7em-none-eabi-custom.json
207+
- run: |
208+
cargo build -p compiler_builtins -p libm \
209+
--target etc/thumbv7em-none-eabi-custom.json
208210
209211
benchmarks:
210212
name: Benchmarks

compiler-builtins/configure.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ impl Target {
4545
let out = cmd
4646
.output()
4747
.unwrap_or_else(|e| panic!("failed to run `{cmd:?}`: {e}"));
48-
assert!(out.status.success(), "failed to run `{cmd:?}`");
4948
let rustc_cfg = str::from_utf8(&out.stdout).unwrap();
49+
let rustc_output_ok = out.status.success();
50+
let reliable_f128 =
51+
!rustc_output_ok || rustc_cfg.lines().any(|l| l == "target_has_reliable_f128");
52+
let reliable_f16 =
53+
!rustc_output_ok || rustc_cfg.lines().any(|l| l == "target_has_reliable_f16");
5054

5155
Self {
5256
triple,
@@ -67,8 +71,8 @@ impl Target {
6771
.split(",")
6872
.map(ToOwned::to_owned)
6973
.collect(),
70-
reliable_f128: rustc_cfg.lines().any(|l| l == "target_has_reliable_f128"),
71-
reliable_f16: rustc_cfg.lines().any(|l| l == "target_has_reliable_f16"),
74+
reliable_f128,
75+
reliable_f16,
7276
}
7377
}
7478

0 commit comments

Comments
 (0)