Struct rustc_back::target::TargetUnstable
[-] [+]
[src]
pub struct Target { pub data_layout: String, pub llvm_target: String, pub target_endian: String, pub target_pointer_width: String, pub target_os: String, pub arch: String, pub options: TargetOptions, }
Everything rustc
knows about how to compile for a specific target.
Every field here must be specified, and has no default value.
Fields
data_layout | Data layout to pass to LLVM. |
llvm_target | Target triple to pass to LLVM. |
target_endian | String to use as the |
target_pointer_width | String to use as the |
target_os | OS name to use for conditional compilation. |
arch | Architecture to use for ABI considerations. Valid options: "x86", "x86_64", "arm", "aarch64", "mips", and "powerpc". "mips" includes "mipsel". |
options | Optional settings with defaults. |
Methods
impl Target
fn adjust_abi(&self, abi: Abi) -> Abi
Given a function ABI, turn "System" into the correct ABI for this target.
fn from_json(obj: Json) -> Target
Load a target descriptor from a JSON object.
fn search(target: &str) -> Result<Target, String>
Search RUST_TARGET_PATH for a JSON file specifying the given target triple. Note that it could also just be a bare filename already, so also check for that. If one of the hardcoded targets we know about, just return it directly.
The error string could come from any of the APIs called, including filesystem access and JSON decoding.