rust-lang / rustc_codegen_gcc

libgccjit AOT codegen for rustc
Apache License 2.0
905 stars 60 forks source link

Add test using a target JSON spec file in the CI #401

Closed antoyo closed 4 months ago

antoyo commented 8 months ago

The documentation describes how to use a JSON spec file. It would be nice to test this in the CI to make sure it keeps working.

Here's an example m68k-unknown-linux-gnu.json:

{
   "arch": "mips",
   "cpu": "m68k",
   "crt-static-respected": true,
   "data-layout": "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64",
   "dynamic-linking": true,
   "env": "gnu",
   "executables": true,
   "features": "+fpxx,+nooddspreg",
   "has-elf-tls": true,
   "has-rpath": true,
   "is-builtin": false,
   "llvm-target": "m68k-unknown-linux-gnu",
   "max-atomic-width": 32,
   "os": "linux",
   "position-independent-executables": true,
   "relro-level": "full",
   "target-endian": "big",
   "target-family": [
     "unix"
   ],
   "target-mcount": "_mcount",
   "target-pointer-width": "32"
 }

This file could be added in the examples or tests directory.

antoyo commented 4 months ago

Fixed by https://github.com/antoyo/rustc_codegen_gcc/pull/12.