breaking changes to the way targets work in zig

* CLI: `-target [name]` instead of `--target-*` args.
   This matches clang's API.
 * `builtin.Environ` renamed to `builtin.Abi`
   - likewise `builtin.environ` renamed to `builtin.abi`
 * stop hiding the concept of sub-arch. closes #1526
 * `zig targets` only shows available targets. closes #438
 * include all targets in readme, even those that don't
   print with `zig targets` but note they are Tier 4
 * refactor target.cpp and make the naming conventions
   more consistent
 * introduce the concept of a "default C ABI" for a given
   OS/Arch combo. As a rule of thumb, if the system compiler
   is clang or gcc then the default C ABI is the gnu ABI.
This commit is contained in:
Andrew Kelley
2019-02-26 15:51:32 -05:00
parent 1ec1097bd3
commit ade10387a5
25 changed files with 875 additions and 740 deletions

View File

@@ -37,6 +37,11 @@ const char *err_str(Error err) {
case ErrorPathTooLong: return "path too long";
case ErrorCCompilerCannotFindFile: return "C compiler cannot find file";
case ErrorReadingDepFile: return "failed to read .d file";
case ErrorMissingArchitecture: return "missing architecture";
case ErrorMissingOperatingSystem: return "missing operating system";
case ErrorUnknownArchitecture: return "unrecognized architecture";
case ErrorUnknownOperatingSystem: return "unrecognized operating system";
case ErrorUnknownABI: return "unrecognized C ABI";
}
return "(invalid error)";
}