Skip to content

Instantly share code, notes, and snippets.

@tstellanova
Created March 16, 2019 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tstellanova/597bc1fe0aa963fbb2547ccb284c7f0d to your computer and use it in GitHub Desktop.
Save tstellanova/597bc1fe0aa963fbb2547ccb284c7f0d to your computer and use it in GitHub Desktop.
Dump the rust platform target specification for a specific target
blip:mbox todd$ rustc +nightly -Z unstable-options --print target-spec-json --target=thumbv7em-none-eabihf 
{
  "abi-blacklist": [
    "stdcall",
    "fastcall",
    "vectorcall",
    "thiscall",
    "win64",
    "sysv64"
  ],
  "arch": "arm",
  "data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
  "emit-debug-gdb-scripts": false,
  "env": "",
  "executables": true,
  "features": "+vfp4,+d16,+fp-only-sp",
  "is-builtin": true,
  "linker": "rust-lld",
  "linker-flavor": "ld.lld",
  "llvm-target": "thumbv7em-none-eabihf",
  "max-atomic-width": 32,
  "os": "none",
  "panic-strategy": "abort",
  "relocation-model": "static",
  "target-c-int-width": "32",
  "target-endian": "little",
  "target-pointer-width": "32",
  "vendor": ""
}
@tstellanova
Copy link
Author

blip:mbox todd$ rustc +nightly -Z unstable-options --print target-spec-json
{
  "abi-return-struct-as-int": true,
  "arch": "x86_64",
  "archive-format": "bsd",
  "cpu": "core2",
  "data-layout": "e-m:o-i64:64-f80:128-n8:16:32:64-S128",
  "dll-suffix": ".dylib",
  "dynamic-linking": true,
  "eliminate-frame-pointer": false,
  "emit-debug-gdb-scripts": false,
  "env": "",
  "executables": true,
  "function-sections": false,
  "has-elf-tls": true,
  "has-rpath": true,
  "is-builtin": true,
  "is-like-osx": true,
  "linker-flavor": "gcc",
  "llvm-target": "x86_64-apple-darwin",
  "max-atomic-width": 128,
  "os": "macos",
  "pre-link-args": {
    "gcc": [
      "-m64"
    ]
  },
  "stack-probes": true,
  "target-c-int-width": "32",
  "target-endian": "little",
  "target-family": "unix",
  "target-pointer-width": "64",
  "vendor": "apple"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment