Skip to content

Commit a2a9604

Browse files
committed
Build Switch on CI
1 parent 62ad61f commit a2a9604

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.travis.yml

+21
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,27 @@ matrix:
207207
- env: TARGET=wasm32-unknown-wasi
208208
rust: nightly
209209
stage: tier2
210+
- name: "Nintendo Switch - build libcore only"
211+
rust: nightly
212+
stage: tier2
213+
install:
214+
- rustup component add rust-src
215+
- (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild)
216+
script:
217+
- mkdir -p target
218+
- cd target
219+
- wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb
220+
- sudo dpkg -i devkitpro-pacman.deb
221+
- sudo dkp-pacman -Sy
222+
- sudo dkp-pacman -Syu
223+
- sudo dkp-pacman -S -v --noconfirm switch-dev devkitA64
224+
- export PATH="$PATH:/opt/devkitpro/devkitA64/bin"
225+
- export PATH="$PATH:/opt/devkitpro/tools/bin"
226+
- cd ..
227+
# Pull the target spec up into the current directory and then build
228+
- mv ci/switch.json switch.json
229+
- cargo xbuild -p core_arch --target switch.json
230+
210231

211232
allow_failures:
212233
# FIXME: android build bots time out irregularly

ci/switch.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"family": "unix",
3+
"env": "newlib",
4+
"target-env": "newlib",
5+
"target-family": "unix",
6+
"target-c-int-width": "32",
7+
"target-endian": "little",
8+
"target-pointer-width": "64",
9+
"os": "horizon",
10+
"arch": "aarch64",
11+
"panic-strategy": "unwind",
12+
"abi-blacklist": [
13+
"stdcall",
14+
"fastcall",
15+
"vectorcall",
16+
"thiscall",
17+
"win64",
18+
"sysv64"
19+
],
20+
"dynamic-linking" : false,
21+
"features": "+a53,+strict-align",
22+
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
23+
"executables": true,
24+
"position-independent-executables" : true,
25+
"linker-flavor": "gcc",
26+
"llvm-target": "aarch64-unknown-none",
27+
"has-elf-tls" : false,
28+
"linker-is-gnu" : true,
29+
"disable-redzone" : true,
30+
"relocation-model" : "pic",
31+
"max-atomic-width": 128,
32+
"exe-suffix": ".elf",
33+
"staticlib-suffix" : ".a",
34+
"trap-unreachable" : true,
35+
"emit-debug-gdb-scripts" : true,
36+
"requires-uwtable" : true
37+
}

0 commit comments

Comments
 (0)