1
Fork 0

Add #[cfg(target_has_atomic)] to get atomic support for the current target

This commit is contained in:
Amanieu d'Antras 2016-04-15 20:16:19 +01:00
parent 50909f2d50
commit 04835ea5ec
45 changed files with 90 additions and 10 deletions

View file

@ -2091,6 +2091,8 @@ The following configurations must be defined by the implementation:
* `target_pointer_width = "..."` - Target pointer width in bits. This is set * `target_pointer_width = "..."` - Target pointer width in bits. This is set
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
64-bit pointers. 64-bit pointers.
* `target_has_atomic = "..."` - Set of integer sizes on which the target can perform
atomic operations. Values are `"8"`, `"16"`, `"32"`, `"64"` and `"ptr"`.
* `target_vendor = "..."` - Vendor of the target, for example `apple`, `pc`, or * `target_vendor = "..."` - Vendor of the target, for example `apple`, `pc`, or
simply `"unknown"`. simply `"unknown"`.
* `test` - Enabled when compiling the test harness (using the `--test` flag). * `test` - Enabled when compiling the test harness (using the `--test` flag).
@ -2295,6 +2297,9 @@ The currently implemented features of the reference compiler are:
* `cfg_target_vendor` - Allows conditional compilation using the `target_vendor` * `cfg_target_vendor` - Allows conditional compilation using the `target_vendor`
matcher which is subject to change. matcher which is subject to change.
* `cfg_target_has_atomic` - Allows conditional compilation using the `target_has_atomic`
matcher which is subject to change.
* `concat_idents` - Allows use of the `concat_idents` macro, which is in many * `concat_idents` - Allows use of the `concat_idents` macro, which is in many
ways insufficient for concatenating identifiers, and may be ways insufficient for concatenating identifiers, and may be
removed entirely for something more wholesome. removed entirely for something more wholesome.

View file

@ -63,6 +63,7 @@
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(concat_idents)] #![feature(concat_idents)]
#![feature(const_fn)] #![feature(const_fn)]
#![feature(cfg_target_has_atomic)]
#![feature(custom_attribute)] #![feature(custom_attribute)]
#![feature(fundamental)] #![feature(fundamental)]
#![feature(inclusive_range_syntax)] #![feature(inclusive_range_syntax)]

View file

@ -695,6 +695,7 @@ pub fn default_configuration(sess: &Session) -> ast::CrateConfig {
let os = &sess.target.target.target_os; let os = &sess.target.target.target_os;
let env = &sess.target.target.target_env; let env = &sess.target.target.target_env;
let vendor = &sess.target.target.target_vendor; let vendor = &sess.target.target.target_vendor;
let max_atomic_width = sess.target.target.options.max_atomic_width;
let fam = if let Some(ref fam) = sess.target.target.options.target_family { let fam = if let Some(ref fam) = sess.target.target.options.target_family {
intern(fam) intern(fam)
@ -721,6 +722,15 @@ pub fn default_configuration(sess: &Session) -> ast::CrateConfig {
if sess.target.target.options.has_elf_tls { if sess.target.target.options.has_elf_tls {
ret.push(attr::mk_word_item(InternedString::new("target_thread_local"))); ret.push(attr::mk_word_item(InternedString::new("target_thread_local")));
} }
for &i in &[8, 16, 32, 64, 128] {
if i <= max_atomic_width {
let s = i.to_string();
ret.push(mk(InternedString::new("target_has_atomic"), intern(&s)));
if &s == wordsz {
ret.push(mk(InternedString::new("target_has_atomic"), intern("ptr")));
}
}
}
if sess.opts.debug_assertions { if sess.opts.debug_assertions {
ret.push(attr::mk_word_item(InternedString::new("debug_assertions"))); ret.push(attr::mk_word_item(InternedString::new("debug_assertions")));
} }

View file

@ -24,6 +24,7 @@ pub fn target() -> Target {
options: TargetOptions { options: TargetOptions {
features: "+neon,+fp-armv8,+cyclone".to_string(), features: "+neon,+fp-armv8,+cyclone".to_string(),
eliminate_frame_pointer: false, eliminate_frame_pointer: false,
max_atomic_width: 128,
.. opts(Arch::Arm64) .. opts(Arch::Arm64)
}, },
} }

View file

@ -11,6 +11,8 @@
use target::Target; use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::android_base::opts();
base.max_atomic_width = 128;
Target { Target {
llvm_target: "aarch64-linux-android".to_string(), llvm_target: "aarch64-linux-android".to_string(),
target_endian: "little".to_string(), target_endian: "little".to_string(),
@ -20,6 +22,6 @@ pub fn target() -> Target {
target_os: "android".to_string(), target_os: "android".to_string(),
target_env: "".to_string(), target_env: "".to_string(),
target_vendor: "unknown".to_string(), target_vendor: "unknown".to_string(),
options: super::android_base::opts(), options: base,
} }
} }

View file

@ -11,7 +11,8 @@
use target::Target; use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.max_atomic_width = 128;
Target { Target {
llvm_target: "aarch64-unknown-linux-gnu".to_string(), llvm_target: "aarch64-unknown-linux-gnu".to_string(),
target_endian: "little".to_string(), target_endian: "little".to_string(),

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::android_base::opts(); let mut base = super::android_base::opts();
base.features = "+v7,+vfp3,+d16".to_string(); base.features = "+v7,+vfp3,+d16".to_string();
base.max_atomic_width = 64;
Target { Target {
llvm_target: "arm-linux-androideabi".to_string(), llvm_target: "arm-linux-androideabi".to_string(),

View file

@ -11,7 +11,8 @@
use target::{Target, TargetOptions}; use target::{Target, TargetOptions};
pub fn target() -> Target { pub fn target() -> Target {
let base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.max_atomic_width = 64;
Target { Target {
llvm_target: "arm-unknown-linux-gnueabi".to_string(), llvm_target: "arm-unknown-linux-gnueabi".to_string(),
target_endian: "little".to_string(), target_endian: "little".to_string(),

View file

@ -11,7 +11,8 @@
use target::{Target, TargetOptions}; use target::{Target, TargetOptions};
pub fn target() -> Target { pub fn target() -> Target {
let base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.max_atomic_width = 64;
Target { Target {
llvm_target: "arm-unknown-linux-gnueabihf".to_string(), llvm_target: "arm-unknown-linux-gnueabihf".to_string(),
target_endian: "little".to_string(), target_endian: "little".to_string(),

View file

@ -23,6 +23,7 @@ pub fn target() -> Target {
target_vendor: "apple".to_string(), target_vendor: "apple".to_string(),
options: TargetOptions { options: TargetOptions {
features: "+v7,+vfp3,+neon".to_string(), features: "+v7,+vfp3,+neon".to_string(),
max_atomic_width: 64,
.. opts(Arch::Armv7) .. opts(Arch::Armv7)
} }
} }

View file

@ -25,6 +25,7 @@ pub fn target() -> Target {
options: TargetOptions { options: TargetOptions {
features: "+v7,+vfp3,+neon".to_string(), features: "+v7,+vfp3,+neon".to_string(),
cpu: "cortex-a8".to_string(), cpu: "cortex-a8".to_string(),
max_atomic_width: 64,
.. base .. base
} }
} }

View file

@ -23,6 +23,7 @@ pub fn target() -> Target {
target_vendor: "apple".to_string(), target_vendor: "apple".to_string(),
options: TargetOptions { options: TargetOptions {
features: "+v7,+vfp4,+neon".to_string(), features: "+v7,+vfp4,+neon".to_string(),
max_atomic_width: 64,
.. opts(Arch::Armv7s) .. opts(Arch::Armv7s)
} }
} }

View file

@ -22,6 +22,7 @@ pub fn target() -> Target {
linker_is_gnu: true, linker_is_gnu: true,
allow_asm: false, allow_asm: false,
obj_is_bitcode: true, obj_is_bitcode: true,
max_atomic_width: 32,
.. Default::default() .. Default::default()
}; };
Target { Target {

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use target::Target; use target::{Target, TargetOptions};
use super::apple_ios_base::{opts, Arch}; use super::apple_ios_base::{opts, Arch};
pub fn target() -> Target { pub fn target() -> Target {
@ -21,6 +21,9 @@ pub fn target() -> Target {
target_os: "ios".to_string(), target_os: "ios".to_string(),
target_env: "".to_string(), target_env: "".to_string(),
target_vendor: "apple".to_string(), target_vendor: "apple".to_string(),
options: opts(Arch::I386) options: TargetOptions {
max_atomic_width: 64,
.. opts(Arch::I386)
}
} }
} }

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::apple_base::opts(); let mut base = super::apple_base::opts();
base.cpu = "yonah".to_string(); base.cpu = "yonah".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m32".to_string()); base.pre_link_args.push("-m32".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::android_base::opts(); let mut base = super::android_base::opts();
base.cpu = "pentium4".to_string(); base.cpu = "pentium4".to_string();
base.max_atomic_width = 64;
Target { Target {
llvm_target: "i686-linux-android".to_string(), llvm_target: "i686-linux-android".to_string(),

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::windows_base::opts(); let mut base = super::windows_base::opts();
base.cpu = "pentium4".to_string(); base.cpu = "pentium4".to_string();
base.max_atomic_width = 64;
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address // Mark all dynamic libraries and executables as compatible with the larger 4GiB address
// space available to x86 Windows binaries on x86_64. // space available to x86 Windows binaries on x86_64.

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::windows_msvc_base::opts(); let mut base = super::windows_msvc_base::opts();
base.cpu = "pentium4".to_string(); base.cpu = "pentium4".to_string();
base.max_atomic_width = 64;
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address // Mark all dynamic libraries and executables as compatible with the larger 4GiB address
// space available to x86 Windows binaries on x86_64. // space available to x86 Windows binaries on x86_64.

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::dragonfly_base::opts(); let mut base = super::dragonfly_base::opts();
base.cpu = "pentium4".to_string(); base.cpu = "pentium4".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m32".to_string()); base.pre_link_args.push("-m32".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::freebsd_base::opts(); let mut base = super::freebsd_base::opts();
base.cpu = "pentium4".to_string(); base.cpu = "pentium4".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m32".to_string()); base.pre_link_args.push("-m32".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.cpu = "pentium4".to_string(); base.cpu = "pentium4".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m32".to_string()); base.pre_link_args.push("-m32".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::linux_musl_base::opts(); let mut base = super::linux_musl_base::opts();
base.cpu = "pentium4".to_string(); base.cpu = "pentium4".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m32".to_string()); base.pre_link_args.push("-m32".to_string());
base.pre_link_args.push("-Wl,-melf_i386".to_string()); base.pre_link_args.push("-Wl,-melf_i386".to_string());

View file

@ -25,6 +25,7 @@ pub fn target() -> Target {
no_compiler_rt: false, no_compiler_rt: false,
linker_is_gnu: true, linker_is_gnu: true,
allow_asm: false, allow_asm: false,
max_atomic_width: 32,
.. Default::default() .. Default::default()
}; };
Target { Target {

View file

@ -23,6 +23,7 @@ pub fn target() -> Target {
options: TargetOptions { options: TargetOptions {
cpu: "mips32r2".to_string(), cpu: "mips32r2".to_string(),
features: "+mips32r2,+soft-float".to_string(), features: "+mips32r2,+soft-float".to_string(),
max_atomic_width: 32,
..super::linux_base::opts() ..super::linux_base::opts()
}, },
} }

View file

@ -23,6 +23,7 @@ pub fn target() -> Target {
options: TargetOptions { options: TargetOptions {
cpu: "mips32r2".to_string(), cpu: "mips32r2".to_string(),
features: "+mips32r2,+soft-float".to_string(), features: "+mips32r2,+soft-float".to_string(),
max_atomic_width: 32,
..super::linux_base::opts() ..super::linux_base::opts()
} }
} }

View file

@ -24,6 +24,7 @@ pub fn target() -> Target {
options: TargetOptions { options: TargetOptions {
cpu: "mips32".to_string(), cpu: "mips32".to_string(),
features: "+mips32".to_string(), features: "+mips32".to_string(),
max_atomic_width: 32,
..super::linux_base::opts() ..super::linux_base::opts()
}, },
} }

View file

@ -23,6 +23,7 @@ pub fn target() -> Target {
options: TargetOptions { options: TargetOptions {
cpu: "mips32".to_string(), cpu: "mips32".to_string(),
features: "+mips32".to_string(), features: "+mips32".to_string(),
max_atomic_width: 32,
..super::linux_base::opts() ..super::linux_base::opts()
} }
} }

View file

@ -292,6 +292,10 @@ pub struct TargetOptions {
// If we give emcc .o files that are actually .bc files it // If we give emcc .o files that are actually .bc files it
// will 'just work'. // will 'just work'.
pub obj_is_bitcode: bool, pub obj_is_bitcode: bool,
/// Maximum integer size in bits that this target can perform atomic
/// operations on.
pub max_atomic_width: u64,
} }
impl Default for TargetOptions { impl Default for TargetOptions {
@ -340,6 +344,7 @@ impl Default for TargetOptions {
allow_asm: true, allow_asm: true,
has_elf_tls: false, has_elf_tls: false,
obj_is_bitcode: false, obj_is_bitcode: false,
max_atomic_width: 0,
} }
} }
} }
@ -392,6 +397,9 @@ impl Target {
options: Default::default(), options: Default::default(),
}; };
// Default max-atomic-width to target-pointer-width
base.options.max_atomic_width = base.target_pointer_width.parse().unwrap();
macro_rules! key { macro_rules! key {
($key_name:ident) => ( { ($key_name:ident) => ( {
let name = (stringify!($key_name)).replace("_", "-"); let name = (stringify!($key_name)).replace("_", "-");
@ -404,6 +412,12 @@ impl Target {
.map(|o| o.as_boolean() .map(|o| o.as_boolean()
.map(|s| base.options.$key_name = s)); .map(|s| base.options.$key_name = s));
} ); } );
($key_name:ident, u64) => ( {
let name = (stringify!($key_name)).replace("_", "-");
obj.find(&name[..])
.map(|o| o.as_u64()
.map(|s| base.options.$key_name = s));
} );
($key_name:ident, list) => ( { ($key_name:ident, list) => ( {
let name = (stringify!($key_name)).replace("_", "-"); let name = (stringify!($key_name)).replace("_", "-");
obj.find(&name[..]).map(|o| o.as_array() obj.find(&name[..]).map(|o| o.as_array()
@ -451,6 +465,7 @@ impl Target {
key!(archive_format); key!(archive_format);
key!(allow_asm, bool); key!(allow_asm, bool);
key!(custom_unwind_resume, bool); key!(custom_unwind_resume, bool);
key!(max_atomic_width, u64);
base base
} }

View file

@ -14,6 +14,7 @@ pub fn target() -> Target {
let mut base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.cpu = "ppc64".to_string(); base.cpu = "ppc64".to_string();
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
base.max_atomic_width = 64;
Target { Target {
llvm_target: "powerpc64-unknown-linux-gnu".to_string(), llvm_target: "powerpc64-unknown-linux-gnu".to_string(),

View file

@ -14,6 +14,7 @@ pub fn target() -> Target {
let mut base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.cpu = "ppc64le".to_string(); base.cpu = "ppc64le".to_string();
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
base.max_atomic_width = 64;
Target { Target {
llvm_target: "powerpc64le-unknown-linux-gnu".to_string(), llvm_target: "powerpc64le-unknown-linux-gnu".to_string(),

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.pre_link_args.push("-m32".to_string()); base.pre_link_args.push("-m32".to_string());
base.max_atomic_width = 32;
Target { Target {
llvm_target: "powerpc-unknown-linux-gnu".to_string(), llvm_target: "powerpc-unknown-linux-gnu".to_string(),

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::apple_base::opts(); let mut base = super::apple_base::opts();
base.cpu = "core2".to_string(); base.cpu = "core2".to_string();
base.max_atomic_width = 128; // core2 support cmpxchg16b
base.eliminate_frame_pointer = false; base.eliminate_frame_pointer = false;
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use target::Target; use target::{Target, TargetOptions};
use super::apple_ios_base::{opts, Arch}; use super::apple_ios_base::{opts, Arch};
pub fn target() -> Target { pub fn target() -> Target {
@ -21,6 +21,9 @@ pub fn target() -> Target {
target_os: "ios".to_string(), target_os: "ios".to_string(),
target_env: "".to_string(), target_env: "".to_string(),
target_vendor: "apple".to_string(), target_vendor: "apple".to_string(),
options: opts(Arch::X86_64) options: TargetOptions {
max_atomic_width: 64,
.. opts(Arch::X86_64)
}
} }
} }

View file

@ -14,6 +14,7 @@ pub fn target() -> Target {
let mut base = super::windows_base::opts(); let mut base = super::windows_base::opts();
base.cpu = "x86-64".to_string(); base.cpu = "x86-64".to_string();
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
base.max_atomic_width = 64;
Target { Target {
llvm_target: "x86_64-pc-windows-gnu".to_string(), llvm_target: "x86_64-pc-windows-gnu".to_string(),

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::windows_msvc_base::opts(); let mut base = super::windows_msvc_base::opts();
base.cpu = "x86-64".to_string(); base.cpu = "x86-64".to_string();
base.max_atomic_width = 64;
Target { Target {
llvm_target: "x86_64-pc-windows-msvc".to_string(), llvm_target: "x86_64-pc-windows-msvc".to_string(),

View file

@ -15,6 +15,7 @@ pub fn target() -> Target {
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
base.linker = "x86_64-rumprun-netbsd-gcc".to_string(); base.linker = "x86_64-rumprun-netbsd-gcc".to_string();
base.ar = "x86_64-rumprun-netbsd-ar".to_string(); base.ar = "x86_64-rumprun-netbsd-ar".to_string();
base.max_atomic_width = 64;
base.dynamic_linking = false; base.dynamic_linking = false;
base.has_rpath = false; base.has_rpath = false;

View file

@ -14,6 +14,7 @@ pub fn target() -> Target {
let mut base = super::solaris_base::opts(); let mut base = super::solaris_base::opts();
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
base.cpu = "x86-64".to_string(); base.cpu = "x86-64".to_string();
base.max_atomic_width = 64;
Target { Target {
llvm_target: "x86_64-pc-solaris".to_string(), llvm_target: "x86_64-pc-solaris".to_string(),

View file

@ -12,6 +12,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::bitrig_base::opts(); let mut base = super::bitrig_base::opts();
base.max_atomic_width = 64;
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::dragonfly_base::opts(); let mut base = super::dragonfly_base::opts();
base.cpu = "x86-64".to_string(); base.cpu = "x86-64".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::freebsd_base::opts(); let mut base = super::freebsd_base::opts();
base.cpu = "x86-64".to_string(); base.cpu = "x86-64".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.cpu = "x86-64".to_string(); base.cpu = "x86-64".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::linux_musl_base::opts(); let mut base = super::linux_musl_base::opts();
base.cpu = "x86-64".to_string(); base.cpu = "x86-64".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
Target { Target {

View file

@ -12,6 +12,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::netbsd_base::opts(); let mut base = super::netbsd_base::opts();
base.max_atomic_width = 64;
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
Target { Target {

View file

@ -13,6 +13,7 @@ use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::openbsd_base::opts(); let mut base = super::openbsd_base::opts();
base.cpu = "x86-64".to_string(); base.cpu = "x86-64".to_string();
base.max_atomic_width = 64;
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
Target { Target {

View file

@ -269,7 +269,10 @@ declare_features! (
(active, pub_restricted, "1.9.0", Some(32409)), (active, pub_restricted, "1.9.0", Some(32409)),
// Allow Drop types in statics/const functions (RFC 1440) // Allow Drop types in statics/const functions (RFC 1440)
(active, drop_types_in_const, "1.9.0", Some(33156)) (active, drop_types_in_const, "1.9.0", Some(33156)),
// Allows cfg(target_has_atomic = "...").
(active, cfg_target_has_atomic, "1.9.0", Some(32976))
); );
declare_features! ( declare_features! (
@ -577,6 +580,7 @@ const GATED_CFGS: &'static [(&'static str, &'static str, fn(&Features) -> bool)]
("target_feature", "cfg_target_feature", cfg_fn!(cfg_target_feature)), ("target_feature", "cfg_target_feature", cfg_fn!(cfg_target_feature)),
("target_vendor", "cfg_target_vendor", cfg_fn!(cfg_target_vendor)), ("target_vendor", "cfg_target_vendor", cfg_fn!(cfg_target_vendor)),
("target_thread_local", "cfg_target_thread_local", cfg_fn!(cfg_target_thread_local)), ("target_thread_local", "cfg_target_thread_local", cfg_fn!(cfg_target_thread_local)),
("target_has_atomic", "cfg_target_has_atomic", cfg_fn!(cfg_target_has_atomic)),
]; ];
#[derive(Debug, Eq, PartialEq)] #[derive(Debug, Eq, PartialEq)]