Struct rustc_cfg::Cfg
[−]
[src]
pub struct Cfg { pub target_os: String, pub target_family: String, pub target_arch: String, pub target_endian: String, pub target_pointer_width: String, pub target_env: String, pub target_has_atomic: Vec<String>, pub target_feature: Vec<String>, // some fields omitted }
Parsed rustc --print cfg
Fields
target_os: String
Equivalent to cfg(target_os = "..")
target_family: String
Equivalent to cfg(unix)
or cfg(windows)
target_arch: String
Equivalent to cfg(target_arch = "..")
target_endian: String
Equivalent to cfg(target_endian = "..")
target_pointer_width: String
Equivalent to cfg(target_pointer_width = "..")
target_env: String
Equivalent to cfg(target_env = "..")
target_has_atomic: Vec<String>
Equivalent to cfg(target_has_atomic = "..")
target_feature: Vec<String>
Equivalent to cfg(target_feature = "..")
Methods
impl Cfg
[src]
fn new<S>(target: S) -> Result<Cfg, ()> where S: AsRef<OsStr>
Returns the target specification of target
Errors
Returns Err
if rustc
can't load the target specification for this target. This usually
means that:
- The target triple is wrong
- This is not a "built-in" target and rustc can't find a target specification file (.json) for this "custom" target.
rustc
was built against an LLVM that doesn't have the backend to support this target. This also implies that you can't generate binaries for this target anyway.