bytecodealliance / bytecodealliance/target-lexicon
target-lexicon OS sometimes doesn't match rustc target jsons
- Dominant language
- Rust
- Stars
- 60
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
I've been playing around with `target-lexicon` a bit and it seems like while most of the time it is pretty faithful to the rustc target json, some of the time the result diverges.
For example, `i686-linux-android` has this rustc target JSON:
```
$ RUSTC_BOOTSTRAP=1 rustc -Z unstable-options --target=i686-linux-android --print target-spec-json
{
"arch": "x86",
"cpu": "pentiumpro",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
"default-uwtable": true,
"dwarf-version": 2,
"dynamic-linking": true,
"env": "gnu",
"executables": true,
"features": "+mmx,+sse,+sse2,+sse3,+ssse3",
"has-rpath": true,
"is-builtin": true,
"llvm-target": "i686-linux-android",
"max-atomic-width": 64,
"os": "android",
"position-independent-executables": true,
"pre-link-args": {
"gcc": [
"-Wl,--allow-multiple-definition"
]
},
"relro-level": "full",
"stack-probes": {
"kind": "call"
},
"target-family": [
"unix"
],
"target-pointer-width": "32"
}
```
However, `target-lexicon` parses the same triple as having the OS Linux rather than Android.
Somewhat related, for `"aarch64-apple-darwin"`:
* rustc has `"os": "macos"`
* target-lexicon parses this as Darwin
I'm not sure exactly what behavior is desired here but I thought it might be useful to flag this. Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.