about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Zakrzewski <zakrzewski.robert@gmail.com>2024-03-27 22:37:19 +0100
committerGitHub <noreply@github.com>2024-03-27 17:37:19 -0400
commit111b3395a8bdb52e78cef2b2a2e2c9ad6f06719c (patch)
tree78b2d907fadb464a247a5c7daa6bd54e97a90334
parent2a88451d6b35306ce870b6489e2cbdbad94975fc (diff)
downloadrust-111b3395a8bdb52e78cef2b2a2e2c9ad6f06719c.tar.gz
rust-111b3395a8bdb52e78cef2b2a2e2c9ad6f06719c.zip
Execute tests using a target defined as a JSON spec (#12)
-rw-r--r--.github/workflows/m68k.yml7
-rw-r--r--target_specs/m68k-unknown-linux-gnu.json26
2 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/m68k.yml b/.github/workflows/m68k.yml
index a8c6b614ce8..47a235b0218 100644
--- a/.github/workflows/m68k.yml
+++ b/.github/workflows/m68k.yml
@@ -88,6 +88,13 @@ jobs:
         sudo mount debian-m68k.img vm
         sudo cp $(which qemu-m68k-static) vm/usr/bin/
 
+    - name: Build sample project with target defined as JSON spec
+      run: |
+        ./y.sh prepare --only-libcore --cross
+        ./y.sh build --target-triple m68k-unknown-linux-gnu --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
+        ./y.sh cargo build --manifest-path=./tests/hello-world/Cargo.toml --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
+        ./y.sh clean all
+
     - name: Build
       run: |
         ./y.sh prepare --only-libcore --cross
diff --git a/target_specs/m68k-unknown-linux-gnu.json b/target_specs/m68k-unknown-linux-gnu.json
new file mode 100644
index 00000000000..95ea06106fb
--- /dev/null
+++ b/target_specs/m68k-unknown-linux-gnu.json
@@ -0,0 +1,26 @@
+{
+  "arch": "m68k",
+  "cpu": "M68020",
+  "crt-static-respected": true,
+  "data-layout": "E-m:e-p:32:16:32-i8:8:8-i16:16:16-i32:16:32-n8:16:32-a:0:16-S16",
+  "dynamic-linking": true,
+  "env": "gnu",
+  "has-rpath": true,
+  "has-thread-local": true,
+  "llvm-target": "m68k-unknown-linux-gnu",
+  "max-atomic-width": 32,
+  "os": "linux",
+  "position-independent-executables": true,
+  "relro-level": "full",
+  "supported-split-debuginfo": [
+    "packed",
+    "unpacked",
+    "off"
+  ],
+  "target-endian": "big",
+  "target-family": [
+    "unix"
+  ],
+  "target-mcount": "_mcount",
+  "target-pointer-width": "32"
+}