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_vendor: Option<String>,
    pub target_has_atomic: Vec<String>,
    pub target_feature: Vec<String>,
    // some fields omitted
}

Parsed rustc --print cfg

Fields

Equivalent to cfg(target_os = "..")

Equivalent to cfg(unix) or cfg(windows)

Equivalent to cfg(target_arch = "..")

Equivalent to cfg(target_endian = "..")

Equivalent to cfg(target_pointer_width = "..")

Equivalent to cfg(target_env = "..")

Equivalent to cfg(target_vendor = "..").

NOTE Only available on Rust >= 1.13.0

Equivalent to cfg(target_has_atomic = "..")

Equivalent to cfg(target_feature = "..")

Methods

impl Cfg
[src]

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.