This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +247
-256
lines changed Expand file tree Collapse file tree 10 files changed +247
-256
lines changed Original file line number Diff line number Diff line change @@ -175,9 +175,7 @@ dependencies = [
175175 " filetime" ,
176176 " getopts" ,
177177 " ignore" ,
178- " lazy_static" ,
179178 " libc" ,
180- " merge" ,
181179 " num_cpus" ,
182180 " once_cell" ,
183181 " opener" ,
@@ -2221,28 +2219,6 @@ dependencies = [
22212219 " autocfg" ,
22222220]
22232221
2224- [[package ]]
2225- name = " merge"
2226- version = " 0.1.0"
2227- source = " registry+https://github.com/rust-lang/crates.io-index"
2228- checksum = " 10bbef93abb1da61525bbc45eeaff6473a41907d19f8f9aa5168d214e10693e9"
2229- dependencies = [
2230- " merge_derive" ,
2231- " num-traits" ,
2232- ]
2233-
2234- [[package ]]
2235- name = " merge_derive"
2236- version = " 0.1.0"
2237- source = " registry+https://github.com/rust-lang/crates.io-index"
2238- checksum = " 209d075476da2e63b4b29e72a2ef627b840589588e71400a25e3565c4f849d07"
2239- dependencies = [
2240- " proc-macro-error" ,
2241- " proc-macro2" ,
2242- " quote" ,
2243- " syn" ,
2244- ]
2245-
22462222[[package ]]
22472223name = " minifier"
22482224version = " 0.0.41"
Original file line number Diff line number Diff line change @@ -44,11 +44,9 @@ libc = "0.2"
4444serde = { version = " 1.0.8" , features = [" derive" ] }
4545serde_json = " 1.0.2"
4646toml = " 0.5"
47- lazy_static = " 1.3.0"
4847time = " 0.1"
4948ignore = " 0.4.10"
5049opener = " 0.5"
51- merge = " 0.1.0"
5250once_cell = " 1.7.2"
5351
5452[target .'cfg(windows)' .dependencies .winapi ]
Original file line number Diff line number Diff line change 1515//! switching compilers for the bootstrap and for build scripts will probably
1616//! never get replaced.
1717
18+ include ! ( "../dylib_util.rs" ) ;
19+
1820use std:: env;
1921use std:: path:: PathBuf ;
2022use std:: process:: { Child , Command } ;
@@ -50,11 +52,11 @@ fn main() {
5052
5153 let rustc = env:: var_os ( rustc) . unwrap_or_else ( || panic ! ( "{:?} was not set" , rustc) ) ;
5254 let libdir = env:: var_os ( libdir) . unwrap_or_else ( || panic ! ( "{:?} was not set" , libdir) ) ;
53- let mut dylib_path = bootstrap :: util :: dylib_path ( ) ;
55+ let mut dylib_path = dylib_path ( ) ;
5456 dylib_path. insert ( 0 , PathBuf :: from ( & libdir) ) ;
5557
5658 let mut cmd = Command :: new ( rustc) ;
57- cmd. args ( & args) . env ( bootstrap :: util :: dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
59+ cmd. args ( & args) . env ( dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
5860
5961 // Get the name of the crate we're compiling, if any.
6062 let crate_name =
@@ -161,7 +163,7 @@ fn main() {
161163 eprintln ! (
162164 "{} command: {:?}={:?} {:?}" ,
163165 prefix,
164- bootstrap :: util :: dylib_path_var( ) ,
166+ dylib_path_var( ) ,
165167 env:: join_paths( & dylib_path) . unwrap( ) ,
166168 cmd,
167169 ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ use std::ffi::OsString;
77use std:: path:: PathBuf ;
88use std:: process:: Command ;
99
10+ include ! ( "../dylib_util.rs" ) ;
11+
1012fn main ( ) {
1113 let args = env:: args_os ( ) . skip ( 1 ) . collect :: < Vec < _ > > ( ) ;
1214 let rustdoc = env:: var_os ( "RUSTDOC_REAL" ) . expect ( "RUSTDOC_REAL was not set" ) ;
@@ -20,14 +22,14 @@ fn main() {
2022 Err ( _) => 0 ,
2123 } ;
2224
23- let mut dylib_path = bootstrap :: util :: dylib_path ( ) ;
25+ let mut dylib_path = dylib_path ( ) ;
2426 dylib_path. insert ( 0 , PathBuf :: from ( libdir. clone ( ) ) ) ;
2527
2628 let mut cmd = Command :: new ( rustdoc) ;
2729 cmd. args ( & args)
2830 . arg ( "--sysroot" )
2931 . arg ( & sysroot)
30- . env ( bootstrap :: util :: dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
32+ . env ( dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
3133
3234 // Force all crates compiled by this compiler to (a) be unstable and (b)
3335 // allow the `rustc_private` feature to link to other unstable crates
@@ -59,7 +61,7 @@ fn main() {
5961 if verbose > 1 {
6062 eprintln ! (
6163 "rustdoc command: {:?}={:?} {:?}" ,
62- bootstrap :: util :: dylib_path_var( ) ,
64+ dylib_path_var( ) ,
6365 env:: join_paths( & dylib_path) . unwrap( ) ,
6466 cmd,
6567 ) ;
Original file line number Diff line number Diff line change @@ -351,7 +351,6 @@ pub enum Kind {
351351 Check ,
352352 Clippy ,
353353 Fix ,
354- Format ,
355354 Test ,
356355 Bench ,
357356 Dist ,
@@ -399,7 +398,7 @@ impl<'a> Builder<'a> {
399398 native:: Lld ,
400399 native:: CrtBeginEnd
401400 ) ,
402- Kind :: Check | Kind :: Clippy { .. } | Kind :: Fix | Kind :: Format => describe ! (
401+ Kind :: Check | Kind :: Clippy { .. } | Kind :: Fix => describe ! (
403402 check:: Std ,
404403 check:: Rustc ,
405404 check:: Rustdoc ,
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ use std::ops::Deref;
1313use std:: path:: { Path , PathBuf } ;
1414use std:: sync:: Mutex ;
1515
16- use lazy_static:: lazy_static;
16+ // FIXME: replace with std::lazy after it gets stabilized and reaches beta
17+ use once_cell:: sync:: Lazy ;
1718
1819use crate :: builder:: Step ;
1920
@@ -222,9 +223,7 @@ impl Interner {
222223 }
223224}
224225
225- lazy_static ! {
226- pub static ref INTERNER : Interner = Interner :: default ( ) ;
227- }
226+ pub static INTERNER : Lazy < Interner > = Lazy :: new ( Interner :: default) ;
228227
229228/// This is essentially a `HashMap` which allows storing any type in its input and
230229/// any type in its output. It is a write-once cache; values are never evicted,
You can’t perform that action at this time.
0 commit comments