rustc_target: Normalize vendor from "" to "unknown" for all targets

Majority of targets use "unknown" vendor and changing it from "unknown" to omitted doesn't make sense.
From the LLVM docs (https://clang.llvm.org/docs/CrossCompilation.html#target-triple):

>Most of the time it can be omitted (and Unknown) will be assumed, which sets the defaults for the specified architecture.
>When a parameter is not important, it can be omitted, or you can choose unknown and the defaults will be used. If you choose a parameter that Clang doesn’t know, like blerg, it’ll ignore and assume unknown
This commit is contained in:
Vadim Petrochenkov
2020-11-11 20:40:51 +03:00
parent 443b45fa9f
commit 1def24c5f4
14 changed files with 3 additions and 19 deletions

View File

@@ -712,14 +712,14 @@ pub struct TargetOptions {
pub endian: String,
/// Width of c_int type. Defaults to "32".
pub c_int_width: String,
/// OS name to use for conditional compilation. Defaults to "none".
/// OS name to use for conditional compilation (`target_os`). Defaults to "none".
/// "none" implies a bare metal target without `std` library.
/// A couple of targets having `std` also use "unknown" as an `os` value,
/// but they are exceptions.
pub os: String,
/// Environment name to use for conditional compilation. Defaults to "".
/// Environment name to use for conditional compilation (`target_env`). Defaults to "".
pub env: String,
/// Vendor name to use for conditional compilation. Defaults to "unknown".
/// Vendor name to use for conditional compilation (`target_vendor`). Defaults to "unknown".
pub vendor: String,
/// Default linker flavor used if `-C linker-flavor` or `-C linker` are not passed
/// on the command line. Defaults to `LinkerFlavor::Gcc`.