Struct rustc_back::target::Target
[−]
[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 target_env: 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 | Unstable Data layout to pass to LLVM. |
llvm_target | Unstable Target triple to pass to LLVM. |
target_endian | Unstable String to use as the |
target_pointer_width | Unstable String to use as the |
target_os | Unstable OS name to use for conditional compilation. |
target_env | Unstable Environment name to use for conditional compilation. |
arch | Unstable Architecture to use for ABI considerations. Valid options: "x86", "x86_64", "arm", "aarch64", "mips", and "powerpc". "mips" includes "mipsel". |
options | Unstable 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.