Skip to content

target "triples" #1452

Open
Open
@alex-s168

Description

@alex-s168

for LM, we want to support different combinations of:

  • compiler backend
  • target architecture
  • target environment: libc, wasip1, ...
  • target OS (optional-ish)
  • object format

to do that, we should add this target "triple" format:

format

<backend> - <arch> - <environment> - <object format> - ....

everything after the fourth dash (if present) can be ignored.
this is for forwards compatibility.

valid backend values

  • c
  • c_gnu: also for clang
  • c_clang
  • c_msvc
  • c_tcc

valid architectures + sub architectures:

  • c: should be used when architecture is completely abstracted away by C backend
  • all LLVM architectures (see here). syntax for arch+sub arch should be: arch_subarch

valid environment values:

  • freestanding
  • libc
  • libc_unix
  • libc_posix
  • libc_glibc
  • libc_win32
  • wasip1
  • wasip1_threads
  • ...

valid object format values:

  • external: when abstracted away by external toolchain (when used with for example C backend)
  • elf
  • wasm: wasm binary format
  • coff
  • ...

examples:

  • c-c-libc-external: what we are doing currently
  • c_clang-riscv64-libc_posix-external
  • llvm-wasm32-wasip1_threads-wasm : there will probably never be an LLVM backend, but that is just an example.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions