File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
compiler/rustc_target/src/spec Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ pub fn target(target_cpu: String) -> Target {
1111 pointer_width : 16 ,
1212 options : TargetOptions {
1313 c_int_width : "16" . to_string ( ) ,
14- os : "unknown" . to_string ( ) ,
1514 cpu : target_cpu. clone ( ) ,
1615 exe_suffix : ".elf" . to_string ( ) ,
1716
Original file line number Diff line number Diff line change @@ -713,6 +713,9 @@ pub struct TargetOptions {
713713 /// Width of c_int type. Defaults to "32".
714714 pub c_int_width : String ,
715715 /// OS name to use for conditional compilation. Defaults to "none".
716+ /// "none" implies a bare metal target without `std` library.
717+ /// A couple of targets having `std` also use "unknown" as an `os` value,
718+ /// but they are exceptions.
716719 pub os : String ,
717720 /// Environment name to use for conditional compilation. Defaults to "".
718721 pub env : String ,
You can’t perform that action at this time.
0 commit comments