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.
This commit is contained in:
Alex Crichton 2016-05-23 22:28:15 -07:00
parent 298730e703
commit fa45670ce4
12 changed files with 32 additions and 80 deletions

View File

@ -35,8 +35,9 @@ def main(argv):
filename = filename_base + '.tar.gz' filename = filename_base + '.tar.gz'
url = 'https://static.rust-lang.org/dist/' + date + '/' + filename url = 'https://static.rust-lang.org/dist/' + date + '/' + filename
dst = dl_dir + '/' + filename dst = dl_dir + '/' + filename
if not os.path.exists(dst): if os.path.exists(dst):
bootstrap.get(url, dst) os.unlink(dst)
bootstrap.get(url, dst)
stage0_dst = triple + '/stage0' stage0_dst = triple + '/stage0'
if os.path.exists(stage0_dst): if os.path.exists(stage0_dst):

View File

@ -43,7 +43,6 @@
// Since libcore defines many fundamental lang items, all tests live in a // Since libcore defines many fundamental lang items, all tests live in a
// separate crate, libcoretest, to avoid bizarre issues. // separate crate, libcoretest, to avoid bizarre issues.
#![cfg_attr(stage0, allow(unused_attributes))]
#![crate_name = "core"] #![crate_name = "core"]
#![stable(feature = "core", since = "1.6.0")] #![stable(feature = "core", since = "1.6.0")]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -10,24 +10,6 @@
#![doc(hidden)] #![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) => ( macro_rules! int_module { ($T:ident, $bits:expr) => (
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]

View File

@ -10,19 +10,6 @@
#![doc(hidden)] #![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) => ( macro_rules! uint_module { ($T:ident, $bits:expr) => (
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]

View File

@ -88,13 +88,13 @@ use default::Default;
use fmt; use fmt;
/// A boolean type which can be safely shared between threads. /// 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")] #[stable(feature = "rust1", since = "1.0.0")]
pub struct AtomicBool { pub struct AtomicBool {
v: UnsafeCell<u8>, v: UnsafeCell<u8>,
} }
#[cfg(any(stage0, target_has_atomic = "8"))] #[cfg(target_has_atomic = "8")]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl Default for AtomicBool { impl Default for AtomicBool {
fn default() -> Self { fn default() -> Self {
@ -103,18 +103,18 @@ impl Default for AtomicBool {
} }
// Send is implicitly implemented 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")] #[stable(feature = "rust1", since = "1.0.0")]
unsafe impl Sync for AtomicBool {} unsafe impl Sync for AtomicBool {}
/// A raw pointer type which can be safely shared between threads. /// 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")] #[stable(feature = "rust1", since = "1.0.0")]
pub struct AtomicPtr<T> { pub struct AtomicPtr<T> {
p: UnsafeCell<*mut T>, p: UnsafeCell<*mut T>,
} }
#[cfg(any(stage0, target_has_atomic = "ptr"))] #[cfg(target_has_atomic = "ptr")]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<T> Default for AtomicPtr<T> { impl<T> Default for AtomicPtr<T> {
fn default() -> 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")] #[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T> Send for AtomicPtr<T> {} 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")] #[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T> Sync for AtomicPtr<T> {} unsafe impl<T> Sync for AtomicPtr<T> {}
@ -167,11 +167,11 @@ pub enum Ordering {
} }
/// An `AtomicBool` initialized to `false`. /// An `AtomicBool` initialized to `false`.
#[cfg(any(stage0, target_has_atomic = "8"))] #[cfg(target_has_atomic = "8")]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub const ATOMIC_BOOL_INIT: AtomicBool = AtomicBool::new(false); pub const ATOMIC_BOOL_INIT: AtomicBool = AtomicBool::new(false);
#[cfg(any(stage0, target_has_atomic = "8"))] #[cfg(target_has_atomic = "8")]
impl AtomicBool { impl AtomicBool {
/// Creates a new `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> { impl<T> AtomicPtr<T> {
/// Creates a new `AtomicPtr`. /// Creates a new `AtomicPtr`.
/// ///
@ -1106,14 +1106,14 @@ atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"), unstable(feature = "integer_atomics", issue = "32976"),
u64 AtomicU64 ATOMIC_U64_INIT u64 AtomicU64 ATOMIC_U64_INIT
} }
#[cfg(any(stage0, target_has_atomic = "ptr"))] #[cfg(target_has_atomic = "ptr")]
atomic_int!{ atomic_int!{
stable(feature = "rust1", since = "1.0.0"), stable(feature = "rust1", since = "1.0.0"),
stable(feature = "extended_compare_and_swap", since = "1.10.0"), stable(feature = "extended_compare_and_swap", since = "1.10.0"),
stable(feature = "atomic_debug", since = "1.3.0"), stable(feature = "atomic_debug", since = "1.3.0"),
isize AtomicIsize ATOMIC_ISIZE_INIT isize AtomicIsize ATOMIC_ISIZE_INIT
} }
#[cfg(any(stage0, target_has_atomic = "ptr"))] #[cfg(target_has_atomic = "ptr")]
atomic_int!{ atomic_int!{
stable(feature = "rust1", since = "1.0.0"), stable(feature = "rust1", since = "1.0.0"),
stable(feature = "extended_compare_and_swap", since = "1.10.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")] #[stable(feature = "atomic_debug", since = "1.3.0")]
impl fmt::Debug for AtomicBool { impl fmt::Debug for AtomicBool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 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")] #[stable(feature = "atomic_debug", since = "1.3.0")]
impl<T> fmt::Debug for AtomicPtr<T> { impl<T> fmt::Debug for AtomicPtr<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -25,8 +25,8 @@
#![feature(staged_api)] #![feature(staged_api)]
#![cfg_attr(not(stage0), panic_runtime)] #![panic_runtime]
#![cfg_attr(not(stage0), feature(panic_runtime))] #![feature(panic_runtime)]
#![cfg_attr(unix, feature(libc))] #![cfg_attr(unix, feature(libc))]
#![cfg_attr(windows, feature(core_intrinsics))] #![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 // 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 // binaries, but it should never be called as we don't link in an unwinding
// runtime at all. // runtime at all.
#[cfg(not(stage0))]
pub mod personalities { pub mod personalities {
#[no_mangle] #[no_mangle]

View File

@ -42,8 +42,8 @@
#![feature(unwind_attributes)] #![feature(unwind_attributes)]
#![cfg_attr(target_env = "msvc", feature(raw))] #![cfg_attr(target_env = "msvc", feature(raw))]
#![cfg_attr(not(stage0), panic_runtime)] #![panic_runtime]
#![cfg_attr(not(stage0), feature(panic_runtime))] #![feature(panic_runtime)]
extern crate alloc; extern crate alloc;
extern crate libc; extern crate libc;

View File

@ -233,8 +233,7 @@ extern {
// an argument to the C++ personality function. // an argument to the C++ personality function.
// //
// Again, I'm not entirely sure what this is describing, it just seems to work. // Again, I'm not entirely sure what this is describing, it just seems to work.
#[cfg_attr(all(not(test), not(stage0)), #[cfg_attr(not(test), lang = "msvc_try_filter")]
lang = "msvc_try_filter")]
static mut TYPE_DESCRIPTOR1: _TypeDescriptor = _TypeDescriptor { static mut TYPE_DESCRIPTOR1: _TypeDescriptor = _TypeDescriptor {
pVFTable: &TYPE_INFO_VTABLE as *const _ as *const _, pVFTable: &TYPE_INFO_VTABLE as *const _ as *const _,
spare: 0 as *mut _, 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 // 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 // it's never actually called by the compiler because __C_specific_handler
// or _except_handler3 is the personality function that is always used. // or _except_handler3 is the personality function that is always used.

View File

@ -210,6 +210,8 @@
test(no_crate_inject, attr(deny(warnings))), test(no_crate_inject, attr(deny(warnings))),
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))] test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
#![needs_panic_runtime]
#![feature(alloc)] #![feature(alloc)]
#![feature(allow_internal_unstable)] #![feature(allow_internal_unstable)]
#![feature(asm)] #![feature(asm)]
@ -272,6 +274,7 @@
#![feature(zero_one)] #![feature(zero_one)]
#![feature(question_mark)] #![feature(question_mark)]
#![feature(try_from)] #![feature(try_from)]
#![feature(needs_panic_runtime)]
// Issue# 30592: Systematically use alloc_system during stage0 since jemalloc // Issue# 30592: Systematically use alloc_system during stage0 since jemalloc
// might be unavailable or disabled // might be unavailable or disabled
@ -284,13 +287,6 @@
#![allow(unused_features)] // std may use features in a platform-specific way #![allow(unused_features)] // std may use features in a platform-specific way
#![cfg_attr(not(stage0), deny(warnings))] #![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; #[cfg(test)] extern crate test;
// We want to reexport a few macros from core but libcore has already been // We want to reexport a few macros from core but libcore has already been

View File

@ -27,9 +27,6 @@
// Reexport some of our utilities which are expected by other crates. // Reexport some of our utilities which are expected by other crates.
pub use panicking::{begin_panic, begin_panic_fmt}; pub use panicking::{begin_panic, begin_panic_fmt};
#[cfg(stage0)]
pub use panicking::begin_panic as begin_unwind;
#[cfg(not(test))] #[cfg(not(test))]
#[lang = "start"] #[lang = "start"]
fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize { fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize {

View File

@ -12,6 +12,6 @@
# tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was
# released on `$date` # released on `$date`
rustc: beta-2016-04-13 rustc: beta-2016-05-24
rustc_key: c2743eb4 rustc_key: a4922355
cargo: nightly-2016-04-10 cargo: nightly-2016-05-22

View File

@ -81,11 +81,10 @@ fn verify(tomlfile: &Path, libfile: &Path, bad: &mut bool) {
} }
// This is intentional, this dependency just makes the crate available // This is intentional, this dependency just makes the crate available
// for others later on. // for others later on. Cover cases
if krate == "alloc_jemalloc" && toml.contains("name = \"std\"") { let whitelisted = krate == "alloc_jemalloc";
continue let whitelisted = whitelisted || krate.starts_with("panic");
} if toml.contains("name = \"std\"") && whitelisted {
if krate == "panic_abort" && toml.contains("name = \"std\"") {
continue continue
} }