Skip to content

Commit 7af6983

Browse files
committed
Add a test for custom targets
1 parent df2e48e commit 7af6983

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/main.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,17 @@ jobs:
195195
run: ./ci/update-musl.sh
196196
- run: cargo clippy --workspace --all-targets
197197

198+
build-custom:
199+
name: Custom target
200+
runs-on: ubuntu-24.04
201+
timeout-minutes: 10
202+
steps:
203+
- uses: actions/checkout@v4
204+
- name: Install Rust
205+
run: rustup update nightly --no-self-update && rustup default nightly
206+
- uses: Swatinem/rust-cache@v2
207+
- run: cargo build -p compiler_builtins -p libm --target etc/thumbv7em-none-eabi-custom.json
208+
198209
benchmarks:
199210
name: Benchmarks
200211
timeout-minutes: 20
@@ -331,6 +342,7 @@ jobs:
331342
success:
332343
needs:
333344
- benchmarks
345+
- build-custom
334346
- clippy
335347
- extensive
336348
- miri

etc/thumbv7em-none-eabi-custom.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"abi": "eabi",
3+
"arch": "arm",
4+
"c-enum-min-bits": 8,
5+
"crt-objects-fallback": "false",
6+
"data-layout": "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64",
7+
"emit-debug-gdb-scripts": false,
8+
"frame-pointer": "always",
9+
"linker": "rust-lld",
10+
"linker-flavor": "gnu-lld",
11+
"llvm-floatabi": "soft",
12+
"llvm-target": "thumbv7em-none-eabi",
13+
"max-atomic-width": 32,
14+
"metadata": {
15+
"description": "Bare ARMv7E-M",
16+
"host_tools": false,
17+
"std": false,
18+
"tier": 2
19+
},
20+
"panic-strategy": "abort",
21+
"relocation-model": "static",
22+
"target-pointer-width": "32"
23+
}

0 commit comments

Comments
 (0)