]> git.lizzy.rs Git - rust.git/commitdiff
Use phase(plugin) in bootstrap crates
authorKeegan McAllister <kmcallister@mozilla.com>
Sun, 25 May 2014 04:15:16 +0000 (21:15 -0700)
committerKeegan McAllister <kmcallister@mozilla.com>
Mon, 9 Jun 2014 21:29:30 +0000 (14:29 -0700)
Do this to avoid warnings on post-stage0 builds.

15 files changed:
src/compiletest/compiletest.rs
src/liballoc/lib.rs
src/libcollections/lib.rs
src/libflate/lib.rs
src/libgetopts/lib.rs
src/librand/lib.rs
src/librustc/lib.rs
src/librustdoc/lib.rs
src/librustrt/lib.rs
src/libserialize/lib.rs
src/libstd/lib.rs
src/libsync/lib.rs
src/libsyntax/lib.rs
src/libterm/lib.rs
src/libtime/lib.rs

index 8fcad94ee1cfc7cff997f61b143426c9c50b7105..de0ca4971f5c2ba085bd1185dcfa5ed6f3f3d38f 100644 (file)
 
 extern crate test;
 extern crate getopts;
-#[phase(link, syntax)]
-extern crate log;
 extern crate green;
 extern crate rustuv;
 
+#[cfg(stage0)]
+#[phase(syntax, link)]
+extern crate log;
+
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate log;
+
 extern crate regex;
 
 use std::os;
index ca7ed6f4ba05bda7329cc0139c0138d92de67330..7e2c9a75fad0d3eee0b23ecb3bb5de6dcc776302 100644 (file)
 #![no_std]
 #![feature(phase)]
 
+#[cfg(stage0)]
 #[phase(syntax, link)]
 extern crate core;
+
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate core;
+
 extern crate libc;
 
 
 #[cfg(test)] extern crate debug;
 #[cfg(test)] extern crate sync;
 #[cfg(test)] extern crate native;
-#[cfg(test)] #[phase(syntax, link)] extern crate std;
-#[cfg(test)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate std;
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate std;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
 
 // Heaps provided for low-level allocation strategies
 
index 602ecf39a836c837374bbe167826a9b4895e0b09..a114755a0ed91a3ac011fd8b6cc8020e8ef3b89c 100644 (file)
 #![feature(macro_rules, managed_boxes, default_type_params, phase, globs)]
 #![no_std]
 
-#[phase(syntax, link)] extern crate core;
 extern crate alloc;
 
+#[cfg(stage0)]
+#[phase(syntax, link)]
+extern crate core;
+
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate core;
+
 #[cfg(test)] extern crate native;
 #[cfg(test)] extern crate test;
 #[cfg(test)] extern crate debug;
-#[cfg(test)] #[phase(syntax, link)] extern crate std;
-#[cfg(test)] #[phase(syntax, link)] extern crate log;
+
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate std;
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate std;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
 
 use core::prelude::*;
 
index 8bfd2d867c130ad749497202ef0d56b40b62d1c4..8d8fe8ffe8cfe404c10aa577d9cd0f4207bc3cc3 100644 (file)
@@ -28,7 +28,8 @@
 #![feature(phase)]
 #![deny(deprecated_owned_vector)]
 
-#[cfg(test)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
 
 extern crate libc;
 
index 10584223486c00a8dd9a495104727817d5383dc3..dec62265516fdb5da21e4285641a8b105300b9e8 100644 (file)
@@ -91,7 +91,8 @@
 #![deny(deprecated_owned_vector)]
 
 #[cfg(test)] extern crate debug;
-#[cfg(test)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
 
 use std::cmp::PartialEq;
 use std::result::{Err, Ok};
index 7a12dcf9f7f319ffcf32b049c5b94c352dea6a37..1f7216fc1a37d9e05b6270cf121703edc3e1af3f 100644 (file)
 #![no_std]
 #![experimental]
 
+#[cfg(stage0)]
 #[phase(syntax, link)]
 extern crate core;
 
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate core;
+
+#[cfg(test, stage0)]
+#[phase(syntax, link)] extern crate std;
+
+#[cfg(test, stage0)]
+#[phase(syntax, link)] extern crate log;
+
+#[cfg(test, not(stage0))]
+#[phase(plugin, link)] extern crate std;
+
+#[cfg(test, not(stage0))]
+#[phase(plugin, link)] extern crate log;
+
 #[cfg(test)] extern crate native;
 #[cfg(test)] extern crate debug;
-#[cfg(test)] #[phase(syntax, link)] extern crate std;
-#[cfg(test)] #[phase(syntax, link)] extern crate log;
 
 use core::prelude::*;
 
index b82dace62efff15fe224cb9db8dbd55a9bc83775..bdbb1a98ac5a4fc02ef03c16b25a81642727894e 100644 (file)
 extern crate syntax;
 extern crate time;
 
+#[cfg(stage0)]
 #[phase(syntax, link)]
 extern crate log;
 
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate log;
+
 pub mod middle {
     pub mod def;
     pub mod trans;
index e623d54675c25c820cddfe898067f9ebca0fe2fb..05875f59fbe1852bb4da502a1cdba1f47aceeb71 100644 (file)
@@ -19,8 +19,6 @@
 extern crate debug;
 extern crate getopts;
 extern crate libc;
-#[phase(syntax, link)]
-extern crate log;
 extern crate rustc;
 extern crate serialize;
 extern crate sync;
 extern crate testing = "test";
 extern crate time;
 
+#[cfg(stage0)]
+#[phase(syntax, link)]
+extern crate log;
+
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate log;
+
 use std::io;
 use std::io::{File, MemWriter};
 use std::str;
index 3158687c6ab937e04be0b278f4a2252e17eba01f..bb57f5c038c0323c4f111c814f37d427f4dd2f3c 100644 (file)
 #![no_std]
 #![experimental]
 
+#[cfg(stage0)]
 #[phase(syntax, link)]
 extern crate core;
+
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate core;
+
 extern crate alloc;
 extern crate libc;
 extern crate collections;
@@ -28,7 +34,9 @@
 #[cfg(test)] extern crate realrustrt = "rustrt";
 #[cfg(test)] extern crate test;
 #[cfg(test)] extern crate native;
-#[cfg(test)] #[phase(syntax, link)] extern crate std;
+
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate std;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate std;
 
 pub use self::util::{Stdio, Stdout, Stderr};
 pub use self::unwind::{begin_unwind, begin_unwind_fmt};
index 08348c963338265c0812094ac2054a8d6e3ca0be..33d20ed7bcd0fe35313719066df22d713da674e1 100644 (file)
 // test harness access
 #[cfg(test)]
 extern crate test;
+
+#[cfg(stage0)]
 #[phase(syntax, link)]
 extern crate log;
 
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate log;
+
 pub use self::serialize::{Decoder, Encoder, Decodable, Encodable,
                           DecoderHelpers, EncoderHelpers};
 
index fbdbc13e1b430ed1ea95462c2e802e970c6a3a90..85813c02d5535be8c25e49515123caf37260e805 100644 (file)
 #[cfg(test)] extern crate native;
 #[cfg(test)] extern crate green;
 #[cfg(test)] extern crate debug;
-#[cfg(test)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
 
 extern crate alloc;
 extern crate core;
index fc4d5fec5f52a06e861232dce288da04ee610a2a..44d17e6fb95ce13bb7d446aa8f3e8e7b556f7119 100644 (file)
 
 #![deny(missing_doc)]
 
-#[cfg(test)]
+#[cfg(test, stage0)]
 #[phase(syntax, link)] extern crate log;
 
+#[cfg(test, not(stage0))]
+#[phase(plugin, link)] extern crate log;
+
 extern crate alloc;
 
 pub use comm::{DuplexStream, duplex};
index 7fe67ad6f87baeab8c3513d53c5bb9897acc012e..754518f5fea3192f8cd7239757b63f8f38706a89 100644 (file)
 
 extern crate serialize;
 extern crate term;
+
+#[cfg(stage0)]
 #[phase(syntax, link)]
 extern crate log;
+
+#[cfg(not(stage0))]
+#[phase(plugin, link)]
+extern crate log;
+
 extern crate fmt_macros;
 extern crate debug;
 
index cc813262576ad9d7d28493a7198b4c434edd048f..76118f642abe0480722ffed527cd58ac3aeb7640 100644 (file)
@@ -52,7 +52,8 @@
 
 #![deny(missing_doc)]
 
-#[phase(syntax, link)] extern crate log;
+#[cfg(stage0)] #[phase(syntax, link)] extern crate log;
+#[cfg(not(stage0))] #[phase(plugin, link)] extern crate log;
 
 pub use terminfo::TerminfoTerminal;
 #[cfg(windows)]
index f087b9289c3d723432601ad54e92df23f8a34a4f..f2af59433358e44bc1cfeba8f9fa91b0d87aa169 100644 (file)
@@ -23,7 +23,9 @@
 #![deny(deprecated_owned_vector)]
 
 #[cfg(test)] extern crate debug;
-#[cfg(test)] #[phase(syntax, link)] extern crate log;
+
+#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
+#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
 
 extern crate serialize;
 extern crate libc;