match target {
$(
$triple => {
- let mut t = try!($module::target());
+ let mut t = $module::target()?;
t.options.is_builtin = true;
// round-trip through the JSON parser to ensure at
// run-time that the parser works correctly
- t = try!(Target::from_json(t.to_json()));
+ t = Target::from_json(t.to_json())?;
debug!("Got builtin target: {:?}", t);
Ok(t)
},
("x86_64-unknown-netbsd", x86_64_unknown_netbsd),
("x86_64-rumprun-netbsd", x86_64_rumprun_netbsd),
+ ("i686_unknown_haiku", i686_unknown_haiku),
+ ("x86_64_unknown_haiku", x86_64_unknown_haiku),
+
("x86_64-apple-darwin", x86_64_apple_darwin),
("i686-apple-darwin", i686_apple_darwin),
pub allows_weak_linkage: bool,
/// Whether the linker support rpaths or not. Defaults to false.
pub has_rpath: bool,
- /// Whether to disable linking to compiler-rt. Defaults to false, as LLVM
- /// will emit references to the functions that compiler-rt provides.
- pub no_compiler_rt: bool,
/// Whether to disable linking to the default libraries, typically corresponds
/// to `-nodefaultlibs`. Defaults to true.
pub no_default_libraries: bool,
linker_is_gnu: false,
allows_weak_linkage: true,
has_rpath: false,
- no_compiler_rt: false,
no_default_libraries: true,
position_independent_executables: false,
pre_link_objects_exe: Vec::new(),
};
let mut base = Target {
- llvm_target: try!(get_req_field("llvm-target")),
- target_endian: try!(get_req_field("target-endian")),
- target_pointer_width: try!(get_req_field("target-pointer-width")),
- data_layout: try!(get_req_field("data-layout")),
- arch: try!(get_req_field("arch")),
- target_os: try!(get_req_field("os")),
+ llvm_target: get_req_field("llvm-target")?,
+ target_endian: get_req_field("target-endian")?,
+ target_pointer_width: get_req_field("target-pointer-width")?,
+ data_layout: get_req_field("data-layout")?,
+ arch: get_req_field("arch")?,
+ target_os: get_req_field("os")?,
target_env: get_opt_field("env", ""),
target_vendor: get_opt_field("vendor", "unknown"),
options: Default::default(),
key!(linker_is_gnu, bool);
key!(allows_weak_linkage, bool);
key!(has_rpath, bool);
- key!(no_compiler_rt, bool);
key!(no_default_libraries, bool);
key!(position_independent_executables, bool);
key!(archive_format);
target_option_val!(linker_is_gnu);
target_option_val!(allows_weak_linkage);
target_option_val!(has_rpath);
- target_option_val!(no_compiler_rt);
target_option_val!(no_default_libraries);
target_option_val!(position_independent_executables);
target_option_val!(archive_format);