File tree Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Original file line number Diff line number Diff line change 1
1
use std:: env;
2
- use std:: path:: { Path , PathBuf } ;
2
+ use std:: path:: PathBuf ;
3
3
use std:: process;
4
4
5
5
use self :: utils:: { is_ci, is_ci_opt, Compiler } ;
@@ -101,12 +101,24 @@ pub(crate) fn main() {
101
101
}
102
102
}
103
103
104
- let bootstrap_host_compiler = Compiler :: bootstrap_with_triple (
105
- std:: env:: var ( "HOST_TRIPLE" )
104
+ let bootstrap_host_compiler = {
105
+ let cargo = rustc_info:: get_cargo_path ( ) ;
106
+ let rustc = rustc_info:: get_rustc_path ( ) ;
107
+ let rustdoc = rustc_info:: get_rustdoc_path ( ) ;
108
+ let triple = std:: env:: var ( "HOST_TRIPLE" )
106
109
. ok ( )
107
110
. or_else ( || config:: get_value ( "host" ) )
108
- . unwrap_or_else ( || rustc_info:: get_host_triple ( Path :: new ( "rustc" ) ) ) ,
109
- ) ;
111
+ . unwrap_or_else ( || rustc_info:: get_host_triple ( & rustc) ) ;
112
+ Compiler {
113
+ cargo,
114
+ rustc,
115
+ rustdoc,
116
+ rustflags : String :: new ( ) ,
117
+ rustdocflags : String :: new ( ) ,
118
+ triple,
119
+ runner : vec ! [ ] ,
120
+ }
121
+ } ;
110
122
let target_triple = std:: env:: var ( "TARGET_TRIPLE" )
111
123
. ok ( )
112
124
. or_else ( || config:: get_value ( "target" ) )
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ use std::path::{Path, PathBuf};
5
5
use std:: process:: { self , Command , Stdio } ;
6
6
7
7
use super :: path:: { Dirs , RelPath } ;
8
- use super :: rustc_info:: { get_cargo_path, get_rustc_path, get_rustdoc_path} ;
9
8
10
9
#[ derive( Clone , Debug ) ]
11
10
pub ( crate ) struct Compiler {
@@ -19,18 +18,6 @@ pub(crate) struct Compiler {
19
18
}
20
19
21
20
impl Compiler {
22
- pub ( crate ) fn bootstrap_with_triple ( triple : String ) -> Compiler {
23
- Compiler {
24
- cargo : get_cargo_path ( ) ,
25
- rustc : get_rustc_path ( ) ,
26
- rustdoc : get_rustdoc_path ( ) ,
27
- rustflags : String :: new ( ) ,
28
- rustdocflags : String :: new ( ) ,
29
- triple,
30
- runner : vec ! [ ] ,
31
- }
32
- }
33
-
34
21
pub ( crate ) fn set_cross_linker_and_runner ( & mut self ) {
35
22
match self . triple . as_str ( ) {
36
23
"aarch64-unknown-linux-gnu" => {
You can’t perform that action at this time.
0 commit comments