let arch = &sess.target.target.arch;
let wordsz = &sess.target.target.target_pointer_width;
let os = &sess.target.target.target_os;
+ let env = &sess.target.target.target_env;
let fam = match sess.target.target.options.is_like_windows {
true => InternedString::new("windows"),
mk(InternedString::new("target_family"), fam),
mk(InternedString::new("target_arch"), intern(arch)),
mk(InternedString::new("target_endian"), intern(end)),
- mk(InternedString::new("target_pointer_width"),
- intern(wordsz))
+ mk(InternedString::new("target_pointer_width"), intern(wordsz)),
+ mk(InternedString::new("target_env"), intern(env)),
];
if sess.opts.debug_assertions {
ret.push(attr::mk_word_item(InternedString::new("debug_assertions")));
target_pointer_width: "64".to_string(),
arch: "aarch64".to_string(),
target_os: "ios".to_string(),
+ target_env: "".to_string(),
options: TargetOptions {
features: "+neon,+fp-armv8,+cyclone".to_string(),
eliminate_frame_pointer: false,
target_pointer_width: "64".to_string(),
arch: "aarch64".to_string(),
target_os: "android".to_string(),
+ target_env: "".to_string(),
options: base,
}
}
llvm_target: "aarch64-unknown-linux-gnu".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "64".to_string(),
+ target_env: "gnu".to_string(),
arch: "aarch64".to_string(),
target_os: "linux".to_string(),
options: base,
target_pointer_width: "32".to_string(),
arch: "arm".to_string(),
target_os: "android".to_string(),
+ target_env: "gnu".to_string(),
options: base,
}
}
target_pointer_width: "32".to_string(),
arch: "arm".to_string(),
target_os: "linux".to_string(),
+ target_env: "gnueabi".to_string(),
options: TargetOptions {
features: "+v6".to_string(),
target_pointer_width: "32".to_string(),
arch: "arm".to_string(),
target_os: "linux".to_string(),
+ target_env: "gnueabihf".to_string(),
options: TargetOptions {
features: "+v6,+vfp2".to_string(),
target_pointer_width: "32".to_string(),
arch: "arm".to_string(),
target_os: "ios".to_string(),
+ target_env: "".to_string(),
options: TargetOptions {
features: "+v7,+vfp3,+neon".to_string(),
.. opts(Arch::Armv7)
target_pointer_width: "32".to_string(),
arch: "arm".to_string(),
target_os: "ios".to_string(),
+ target_env: "".to_string(),
options: TargetOptions {
features: "+v7,+vfp4,+neon".to_string(),
.. opts(Arch::Armv7s)
target_pointer_width: "32".to_string(),
arch: "x86".to_string(),
target_os: "ios".to_string(),
+ target_env: "".to_string(),
options: opts(Arch::I386)
}
}
target_pointer_width: "32".to_string(),
arch: "x86".to_string(),
target_os: "macos".to_string(),
+ target_env: "".to_string(),
options: base,
}
}
target_pointer_width: "32".to_string(),
arch: "x86".to_string(),
target_os: "windows".to_string(),
+ target_env: "gnu".to_string(),
options: options,
}
}
target_pointer_width: "32".to_string(),
arch: "x86".to_string(),
target_os: "dragonfly".to_string(),
+ target_env: "".to_string(),
options: base,
}
}
target_pointer_width: "32".to_string(),
arch: "x86".to_string(),
target_os: "linux".to_string(),
+ target_env: "gnu".to_string(),
options: base,
}
}
target_pointer_width: "32".to_string(),
arch: "mips".to_string(),
target_os: "linux".to_string(),
+ target_env: "gnu".to_string(),
options: super::linux_base::opts()
}
}
target_pointer_width: "32".to_string(),
arch: "mips".to_string(),
target_os: "linux".to_string(),
+ target_env: "gnu".to_string(),
options: super::linux_base::opts()
}
pub target_pointer_width: String,
/// OS name to use for conditional compilation.
pub target_os: String,
+ /// Environment name to use for conditional compilation.
+ pub target_env: String,
/// Architecture to use for ABI considerations. Valid options: "x86", "x86_64", "arm",
/// "aarch64", "mips", and "powerpc". "mips" includes "mipsel".
pub arch: String,
target_pointer_width: get_req_field("target-pointer-width"),
arch: get_req_field("arch"),
target_os: get_req_field("os"),
+ target_env: obj.find("env").and_then(|s| s.as_string())
+ .map(|s| s.to_string()).unwrap_or(String::new()),
options: Default::default(),
};
target_pointer_width: "32".to_string(),
arch: "powerpc".to_string(),
target_os: "linux".to_string(),
+ target_env: "gnu".to_string(),
options: base,
}
}
target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(),
target_os: "macos".to_string(),
+ target_env: "".to_string(),
options: base,
}
}
target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(),
target_os: "ios".to_string(),
+ target_env: "".to_string(),
options: opts(Arch::X86_64)
}
}
target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(),
target_os: "windows".to_string(),
+ target_env: "gnu".to_string(),
options: base,
}
}
target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(),
target_os: "bitrig".to_string(),
+ target_env: "".to_string(),
options: base,
}
}
target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(),
target_os: "dragonfly".to_string(),
+ target_env: "".to_string(),
options: base,
}
}
target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(),
target_os: "freebsd".to_string(),
+ target_env: "".to_string(),
options: base,
}
}
target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(),
target_os: "linux".to_string(),
+ target_env: "gnu".to_string(),
options: base,
}
}
target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(),
target_os: "openbsd".to_string(),
+ target_env: "".to_string(),
options: base,
}
}