File tree 10 files changed +247
-256
lines changed
10 files changed +247
-256
lines changed Original file line number Diff line number Diff line change @@ -175,9 +175,7 @@ dependencies = [
175
175
" filetime" ,
176
176
" getopts" ,
177
177
" ignore" ,
178
- " lazy_static" ,
179
178
" libc" ,
180
- " merge" ,
181
179
" num_cpus" ,
182
180
" once_cell" ,
183
181
" opener" ,
@@ -2221,28 +2219,6 @@ dependencies = [
2221
2219
" autocfg" ,
2222
2220
]
2223
2221
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
-
2246
2222
[[package ]]
2247
2223
name = " minifier"
2248
2224
version = " 0.0.41"
Original file line number Diff line number Diff line change @@ -44,11 +44,9 @@ libc = "0.2"
44
44
serde = { version = " 1.0.8" , features = [" derive" ] }
45
45
serde_json = " 1.0.2"
46
46
toml = " 0.5"
47
- lazy_static = " 1.3.0"
48
47
time = " 0.1"
49
48
ignore = " 0.4.10"
50
49
opener = " 0.5"
51
- merge = " 0.1.0"
52
50
once_cell = " 1.7.2"
53
51
54
52
[target .'cfg(windows)' .dependencies .winapi ]
Original file line number Diff line number Diff line change 15
15
//! switching compilers for the bootstrap and for build scripts will probably
16
16
//! never get replaced.
17
17
18
+ include ! ( "../dylib_util.rs" ) ;
19
+
18
20
use std:: env;
19
21
use std:: path:: PathBuf ;
20
22
use std:: process:: { Child , Command } ;
@@ -50,11 +52,11 @@ fn main() {
50
52
51
53
let rustc = env:: var_os ( rustc) . unwrap_or_else ( || panic ! ( "{:?} was not set" , rustc) ) ;
52
54
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 ( ) ;
54
56
dylib_path. insert ( 0 , PathBuf :: from ( & libdir) ) ;
55
57
56
58
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 ( ) ) ;
58
60
59
61
// Get the name of the crate we're compiling, if any.
60
62
let crate_name =
@@ -161,7 +163,7 @@ fn main() {
161
163
eprintln ! (
162
164
"{} command: {:?}={:?} {:?}" ,
163
165
prefix,
164
- bootstrap :: util :: dylib_path_var( ) ,
166
+ dylib_path_var( ) ,
165
167
env:: join_paths( & dylib_path) . unwrap( ) ,
166
168
cmd,
167
169
) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ use std::ffi::OsString;
7
7
use std:: path:: PathBuf ;
8
8
use std:: process:: Command ;
9
9
10
+ include ! ( "../dylib_util.rs" ) ;
11
+
10
12
fn main ( ) {
11
13
let args = env:: args_os ( ) . skip ( 1 ) . collect :: < Vec < _ > > ( ) ;
12
14
let rustdoc = env:: var_os ( "RUSTDOC_REAL" ) . expect ( "RUSTDOC_REAL was not set" ) ;
@@ -20,14 +22,14 @@ fn main() {
20
22
Err ( _) => 0 ,
21
23
} ;
22
24
23
- let mut dylib_path = bootstrap :: util :: dylib_path ( ) ;
25
+ let mut dylib_path = dylib_path ( ) ;
24
26
dylib_path. insert ( 0 , PathBuf :: from ( libdir. clone ( ) ) ) ;
25
27
26
28
let mut cmd = Command :: new ( rustdoc) ;
27
29
cmd. args ( & args)
28
30
. arg ( "--sysroot" )
29
31
. 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 ( ) ) ;
31
33
32
34
// Force all crates compiled by this compiler to (a) be unstable and (b)
33
35
// allow the `rustc_private` feature to link to other unstable crates
@@ -59,7 +61,7 @@ fn main() {
59
61
if verbose > 1 {
60
62
eprintln ! (
61
63
"rustdoc command: {:?}={:?} {:?}" ,
62
- bootstrap :: util :: dylib_path_var( ) ,
64
+ dylib_path_var( ) ,
63
65
env:: join_paths( & dylib_path) . unwrap( ) ,
64
66
cmd,
65
67
) ;
Original file line number Diff line number Diff line change @@ -351,7 +351,6 @@ pub enum Kind {
351
351
Check ,
352
352
Clippy ,
353
353
Fix ,
354
- Format ,
355
354
Test ,
356
355
Bench ,
357
356
Dist ,
@@ -399,7 +398,7 @@ impl<'a> Builder<'a> {
399
398
native:: Lld ,
400
399
native:: CrtBeginEnd
401
400
) ,
402
- Kind :: Check | Kind :: Clippy { .. } | Kind :: Fix | Kind :: Format => describe ! (
401
+ Kind :: Check | Kind :: Clippy { .. } | Kind :: Fix => describe ! (
403
402
check:: Std ,
404
403
check:: Rustc ,
405
404
check:: Rustdoc ,
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ use std::ops::Deref;
13
13
use std:: path:: { Path , PathBuf } ;
14
14
use std:: sync:: Mutex ;
15
15
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 ;
17
18
18
19
use crate :: builder:: Step ;
19
20
@@ -222,9 +223,7 @@ impl Interner {
222
223
}
223
224
}
224
225
225
- lazy_static ! {
226
- pub static ref INTERNER : Interner = Interner :: default ( ) ;
227
- }
226
+ pub static INTERNER : Lazy < Interner > = Lazy :: new ( Interner :: default) ;
228
227
229
228
/// This is essentially a `HashMap` which allows storing any type in its input and
230
229
/// 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