]> git.lizzy.rs Git - rust.git/commitdiff
mk: Prepare for a new stage0 compiler
authorAlex Crichton <alex@alexcrichton.com>
Tue, 24 May 2016 05:28:15 +0000 (22:28 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 31 May 2016 23:11:49 +0000 (16:11 -0700)
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.

12 files changed:
src/etc/get-stage0.py
src/libcore/lib.rs
src/libcore/num/int_macros.rs
src/libcore/num/uint_macros.rs
src/libcore/sync/atomic.rs
src/libpanic_abort/lib.rs
src/libpanic_unwind/lib.rs
src/libpanic_unwind/seh.rs
src/libstd/lib.rs
src/libstd/rt.rs
src/stage0.txt
src/tools/tidy/src/cargo.rs

index 3a609957faff1c1d8f4ad82e537768ec2e223b4f..22ec624e4f580a1400341c7dcd6d3caf288031a6 100644 (file)
@@ -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):
index a054e41b2084aa06abfa9736f0043e02aa31f39b..f2a297b763028014409b3c75d0f60ecdf21ff831 100644 (file)
@@ -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"]
index fb1a3bbe3b4fbfeab57972add09e3dd9b260d549..bd6cfc427affd04a936a2a115440c5989eb7606f 100644 (file)
 
 #![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")]
index af6b1b89f96d571fa9e2971f62e0200f9d5d1d31..2ab2f9548ef1bfd5ec67ccfb79b1a43efa333329 100644 (file)
 
 #![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")]
index d0a64de07e51c2795045b567f395a9b35fe44d28..658b1312c496d8b580b6efef49800e49efe1185d 100644 (file)
 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 @@ fn default() -> Self {
 }
 
 // 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 @@ fn default() -> 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 @@ pub fn fetch_xor(&self, val: bool, order: Ordering) -> bool {
     }
 }
 
-#[cfg(any(stage0, target_has_atomic = "ptr"))]
+#[cfg(target_has_atomic = "ptr")]
 impl<T> AtomicPtr<T> {
     /// Creates a new `AtomicPtr`.
     ///
@@ -1106,14 +1106,14 @@ pub fn fetch_xor(&self, val: $int_type, order: Ordering) -> $int_type {
     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 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[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 {
index c085ddeb75b97f407ab552f825c4b66a381b45b7..b87160dd75d046e6c8f5068d886e0e01a4f92be6 100644 (file)
@@ -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 @@ unsafe fn abort() -> ! {
 // 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]
index 17cbd2e0d4c39b299a2530e12f7e2d05487874cf..39a93c4ac29481f385e6e8cd16025e1c60c1f994 100644 (file)
@@ -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;
index 04a3f7b9663fbe203ad1a87a30f3dc34329b7077..2b2926426f778c0f6f78b2db6299dbb32d299472 100644 (file)
@@ -233,8 +233,7 @@ pub struct _TypeDescriptor {
 // 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 panic(data: Box<Any + Send>) -> u32 {
     })
 }
 
-#[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.
index 8f41bdf39e97a0c054f1b1645489781e908c95c8..7114d47e6e8904b7632b0620aad1e03fdd84634b 100644 (file)
        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)]
 #![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
 #![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
index 6eee4ee9bbe5f66edc86d89c8fe451984025356e..7217eaa1325d63f140a14fed89293c152e93ae7c 100644 (file)
@@ -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 {
index 58b7f8f2698cfea81d34f0e0e75105357eb472e5..8e46bdfc5b6b81b8534e38d99ef101ca25dd1174 100644 (file)
@@ -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
index 6a9d52cb0048f17eb913378a525f80e6c966b2fb..48016721d52c10783095b721b182b72566dd70af 100644 (file)
@@ -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
         }