about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-05-23 22:28:15 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-05-31 16:11:49 -0700
commitfa45670ce4c3813e9af0e50a6b61742310fdaa88 (patch)
tree3e08c66b9c125b072ea0611ca39f8e482d291178
parent298730e7032cd55809423773da397cd5c7d827d4 (diff)
downloadrust-fa45670ce4c3813e9af0e50a6b61742310fdaa88.tar.gz
rust-fa45670ce4c3813e9af0e50a6b61742310fdaa88.zip
mk: Prepare for a new stage0 compiler
This commit prepares the source for a new stage0 compiler, the 1.10.0 beta
compiler. These artifacts are hot off the bots and should be ready to go.
-rw-r--r--src/etc/get-stage0.py5
-rw-r--r--src/libcore/lib.rs1
-rw-r--r--src/libcore/num/int_macros.rs18
-rw-r--r--src/libcore/num/uint_macros.rs13
-rw-r--r--src/libcore/sync/atomic.rs28
-rw-r--r--src/libpanic_abort/lib.rs5
-rw-r--r--src/libpanic_unwind/lib.rs4
-rw-r--r--src/libpanic_unwind/seh.rs10
-rw-r--r--src/libstd/lib.rs10
-rw-r--r--src/libstd/rt.rs3
-rw-r--r--src/stage0.txt6
-rw-r--r--src/tools/tidy/src/cargo.rs9
12 files changed, 32 insertions, 80 deletions
diff --git a/src/etc/get-stage0.py b/src/etc/get-stage0.py
index 3a609957faf..22ec624e4f5 100644
--- a/src/etc/get-stage0.py
+++ b/src/etc/get-stage0.py
@@ -35,8 +35,9 @@ def main(argv):
     filename = filename_base + '.tar.gz'
     url = 'https://static.rust-lang.org/dist/' + date + '/' + filename
     dst = dl_dir + '/' + filename
-    if not os.path.exists(dst):
-        bootstrap.get(url, dst)
+    if os.path.exists(dst):
+        os.unlink(dst)
+    bootstrap.get(url, dst)
 
     stage0_dst = triple + '/stage0'
     if os.path.exists(stage0_dst):
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index a054e41b208..f2a297b7630 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -43,7 +43,6 @@
 // Since libcore defines many fundamental lang items, all tests live in a
 // separate crate, libcoretest, to avoid bizarre issues.
 
-#![cfg_attr(stage0, allow(unused_attributes))]
 #![crate_name = "core"]
 #![stable(feature = "core", since = "1.6.0")]
 #![crate_type = "rlib"]
diff --git a/src/libcore/num/int_macros.rs b/src/libcore/num/int_macros.rs
index fb1a3bbe3b4..bd6cfc427af 100644
--- a/src/libcore/num/int_macros.rs
+++ b/src/libcore/num/int_macros.rs
@@ -10,24 +10,6 @@
 
 #![doc(hidden)]
 
-#[cfg(stage0)]
-macro_rules! int_module { ($T:ty, $bits:expr) => (
-
-// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
-// calling the `Bounded::min_value` function.
-#[stable(feature = "rust1", since = "1.0.0")]
-#[allow(missing_docs)]
-pub const MIN: $T = (-1 as $T) << ($bits - 1);
-// FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0.
-// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
-// calling the `Bounded::max_value` function.
-#[stable(feature = "rust1", since = "1.0.0")]
-#[allow(missing_docs)]
-pub const MAX: $T = !MIN;
-
-) }
-
-#[cfg(not(stage0))]
 macro_rules! int_module { ($T:ident, $bits:expr) => (
 
 #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/src/libcore/num/uint_macros.rs b/src/libcore/num/uint_macros.rs
index af6b1b89f96..2ab2f9548ef 100644
--- a/src/libcore/num/uint_macros.rs
+++ b/src/libcore/num/uint_macros.rs
@@ -10,19 +10,6 @@
 
 #![doc(hidden)]
 
-#[cfg(stage0)]
-macro_rules! uint_module { ($T:ty, $bits:expr) => (
-
-#[stable(feature = "rust1", since = "1.0.0")]
-#[allow(missing_docs)]
-pub const MIN: $T = 0 as $T;
-#[stable(feature = "rust1", since = "1.0.0")]
-#[allow(missing_docs)]
-pub const MAX: $T = !0 as $T;
-
-) }
-
-#[cfg(not(stage0))]
 macro_rules! uint_module { ($T:ident, $bits:expr) => (
 
 #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/src/libcore/sync/atomic.rs b/src/libcore/sync/atomic.rs
index d0a64de07e5..658b1312c49 100644
--- a/src/libcore/sync/atomic.rs
+++ b/src/libcore/sync/atomic.rs
@@ -88,13 +88,13 @@ use default::Default;
 use fmt;
 
 /// A boolean type which can be safely shared between threads.
-#[cfg(any(stage0, target_has_atomic = "8"))]
+#[cfg(target_has_atomic = "8")]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct AtomicBool {
     v: UnsafeCell<u8>,
 }
 
-#[cfg(any(stage0, target_has_atomic = "8"))]
+#[cfg(target_has_atomic = "8")]
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Default for AtomicBool {
     fn default() -> Self {
@@ -103,18 +103,18 @@ impl Default for AtomicBool {
 }
 
 // Send is implicitly implemented for AtomicBool.
-#[cfg(any(stage0, target_has_atomic = "8"))]
+#[cfg(target_has_atomic = "8")]
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl Sync for AtomicBool {}
 
 /// A raw pointer type which can be safely shared between threads.
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct AtomicPtr<T> {
     p: UnsafeCell<*mut T>,
 }
 
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Default for AtomicPtr<T> {
     fn default() -> AtomicPtr<T> {
@@ -122,10 +122,10 @@ impl<T> Default for AtomicPtr<T> {
     }
 }
 
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl<T> Send for AtomicPtr<T> {}
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl<T> Sync for AtomicPtr<T> {}
 
@@ -167,11 +167,11 @@ pub enum Ordering {
 }
 
 /// An `AtomicBool` initialized to `false`.
-#[cfg(any(stage0, target_has_atomic = "8"))]
+#[cfg(target_has_atomic = "8")]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub const ATOMIC_BOOL_INIT: AtomicBool = AtomicBool::new(false);
 
-#[cfg(any(stage0, target_has_atomic = "8"))]
+#[cfg(target_has_atomic = "8")]
 impl AtomicBool {
     /// Creates a new `AtomicBool`.
     ///
@@ -508,7 +508,7 @@ impl AtomicBool {
     }
 }
 
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 impl<T> AtomicPtr<T> {
     /// Creates a new `AtomicPtr`.
     ///
@@ -1106,14 +1106,14 @@ atomic_int! {
     unstable(feature = "integer_atomics", issue = "32976"),
     u64 AtomicU64 ATOMIC_U64_INIT
 }
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 atomic_int!{
     stable(feature = "rust1", since = "1.0.0"),
     stable(feature = "extended_compare_and_swap", since = "1.10.0"),
     stable(feature = "atomic_debug", since = "1.3.0"),
     isize AtomicIsize ATOMIC_ISIZE_INIT
 }
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 atomic_int!{
     stable(feature = "rust1", since = "1.0.0"),
     stable(feature = "extended_compare_and_swap", since = "1.10.0"),
@@ -1311,7 +1311,7 @@ pub fn fence(order: Ordering) {
 }
 
 
-#[cfg(any(stage0, target_has_atomic = "8"))]
+#[cfg(target_has_atomic = "8")]
 #[stable(feature = "atomic_debug", since = "1.3.0")]
 impl fmt::Debug for AtomicBool {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -1319,7 +1319,7 @@ impl fmt::Debug for AtomicBool {
     }
 }
 
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 #[stable(feature = "atomic_debug", since = "1.3.0")]
 impl<T> fmt::Debug for AtomicPtr<T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
diff --git a/src/libpanic_abort/lib.rs b/src/libpanic_abort/lib.rs
index c085ddeb75b..b87160dd75d 100644
--- a/src/libpanic_abort/lib.rs
+++ b/src/libpanic_abort/lib.rs
@@ -25,8 +25,8 @@
 
 #![feature(staged_api)]
 
-#![cfg_attr(not(stage0), panic_runtime)]
-#![cfg_attr(not(stage0), feature(panic_runtime))]
+#![panic_runtime]
+#![feature(panic_runtime)]
 #![cfg_attr(unix, feature(libc))]
 #![cfg_attr(windows, feature(core_intrinsics))]
 
@@ -93,7 +93,6 @@ pub unsafe extern fn __rust_start_panic(_data: usize, _vtable: usize) -> u32 {
 // Essentially this symbol is just defined to get wired up to libcore/libstd
 // binaries, but it should never be called as we don't link in an unwinding
 // runtime at all.
-#[cfg(not(stage0))]
 pub mod personalities {
 
     #[no_mangle]
diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs
index 17cbd2e0d4c..39a93c4ac29 100644
--- a/src/libpanic_unwind/lib.rs
+++ b/src/libpanic_unwind/lib.rs
@@ -42,8 +42,8 @@
 #![feature(unwind_attributes)]
 #![cfg_attr(target_env = "msvc", feature(raw))]
 
-#![cfg_attr(not(stage0), panic_runtime)]
-#![cfg_attr(not(stage0), feature(panic_runtime))]
+#![panic_runtime]
+#![feature(panic_runtime)]
 
 extern crate alloc;
 extern crate libc;
diff --git a/src/libpanic_unwind/seh.rs b/src/libpanic_unwind/seh.rs
index 04a3f7b9663..2b2926426f7 100644
--- a/src/libpanic_unwind/seh.rs
+++ b/src/libpanic_unwind/seh.rs
@@ -233,8 +233,7 @@ extern {
 // an argument to the C++ personality function.
 //
 // Again, I'm not entirely sure what this is describing, it just seems to work.
-#[cfg_attr(all(not(test), not(stage0)),
-           lang = "msvc_try_filter")]
+#[cfg_attr(not(test), lang = "msvc_try_filter")]
 static mut TYPE_DESCRIPTOR1: _TypeDescriptor = _TypeDescriptor {
     pVFTable: &TYPE_INFO_VTABLE as *const _ as *const _,
     spare: 0 as *mut _,
@@ -308,13 +307,6 @@ pub unsafe fn cleanup(payload: [u64; 2]) -> Box<Any + Send> {
     })
 }
 
-#[lang = "msvc_try_filter"]
-#[cfg(stage0)]
-unsafe extern fn __rust_try_filter(_eh_ptrs: *mut u8,
-                                   _payload: *mut u8) -> i32 {
-    return 0
-}
-
 // This is required by the compiler to exist (e.g. it's a lang item), but
 // it's never actually called by the compiler because __C_specific_handler
 // or _except_handler3 is the personality function that is always used.
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 8f41bdf39e9..7114d47e6e8 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -210,6 +210,8 @@
        test(no_crate_inject, attr(deny(warnings))),
        test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
 
+#![needs_panic_runtime]
+
 #![feature(alloc)]
 #![feature(allow_internal_unstable)]
 #![feature(asm)]
@@ -272,6 +274,7 @@
 #![feature(zero_one)]
 #![feature(question_mark)]
 #![feature(try_from)]
+#![feature(needs_panic_runtime)]
 
 // Issue# 30592: Systematically use alloc_system during stage0 since jemalloc
 // might be unavailable or disabled
@@ -284,13 +287,6 @@
 #![allow(unused_features)] // std may use features in a platform-specific way
 #![cfg_attr(not(stage0), deny(warnings))]
 
-// FIXME(stage0): after a snapshot, move needs_panic_runtime up above and remove
-//                this `extern crate` declaration and feature(panic_unwind)
-#![cfg_attr(not(stage0), needs_panic_runtime)]
-#![cfg_attr(not(stage0), feature(needs_panic_runtime))]
-#[cfg(stage0)]
-extern crate panic_unwind as __please_just_link_me_dont_reference_me;
-
 #[cfg(test)] extern crate test;
 
 // We want to reexport a few macros from core but libcore has already been
diff --git a/src/libstd/rt.rs b/src/libstd/rt.rs
index 6eee4ee9bbe..7217eaa1325 100644
--- a/src/libstd/rt.rs
+++ b/src/libstd/rt.rs
@@ -27,9 +27,6 @@
 // Reexport some of our utilities which are expected by other crates.
 pub use panicking::{begin_panic, begin_panic_fmt};
 
-#[cfg(stage0)]
-pub use panicking::begin_panic as begin_unwind;
-
 #[cfg(not(test))]
 #[lang = "start"]
 fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize {
diff --git a/src/stage0.txt b/src/stage0.txt
index 58b7f8f2698..8e46bdfc5b6 100644
--- a/src/stage0.txt
+++ b/src/stage0.txt
@@ -12,6 +12,6 @@
 # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was
 # released on `$date`
 
-rustc: beta-2016-04-13
-rustc_key: c2743eb4
-cargo: nightly-2016-04-10
+rustc: beta-2016-05-24
+rustc_key: a4922355
+cargo: nightly-2016-05-22
diff --git a/src/tools/tidy/src/cargo.rs b/src/tools/tidy/src/cargo.rs
index 6a9d52cb004..48016721d52 100644
--- a/src/tools/tidy/src/cargo.rs
+++ b/src/tools/tidy/src/cargo.rs
@@ -81,11 +81,10 @@ fn verify(tomlfile: &Path, libfile: &Path, bad: &mut bool) {
         }
 
         // This is intentional, this dependency just makes the crate available
-        // for others later on.
-        if krate == "alloc_jemalloc" && toml.contains("name = \"std\"") {
-            continue
-        }
-        if krate == "panic_abort" && toml.contains("name = \"std\"") {
+        // for others later on. Cover cases
+        let whitelisted = krate == "alloc_jemalloc";
+        let whitelisted = whitelisted || krate.starts_with("panic");
+        if toml.contains("name = \"std\"") && whitelisted {
             continue
         }