8000 rustc_target: Change os and vendor values to "none" and "unknown" for some targets by petrochenkov · Pull Request #78951 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

rustc_target: Change os and vendor values to "none" and "unknown" for some targets #78951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
rustc_target: Change os from "unknown" to "none" for bare metal targets
x86_64-fortanix-unknown-sgx and wasm32-unknown-unknown still have os == "unknown" because both have libstd
  • Loading branch information
petrochenkov committed Nov 11, 2020
commit 443b45fa9fd87cf0939e80a64bead413530e375c
1 change: 0 additions & 1 deletion compiler/rustc_target/src/spec/avr_gnu_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub fn target(target_cpu: String) -> Target {
pointer_width: 16,
options: TargetOptions {
c_int_width: "16".to_string(),
os: "unknown".to_string(),
cpu: target_cpu.clone(),
exe_suffix: ".elf".to_string(),

Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,9 @@ pub struct TargetOptions {
/// Width of c_int type. Defaults to "32".
pub c_int_width: String,
/// OS name to use for conditional compilation. 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 "".
pub env: String,
Expand Down
0