@@ -15,7 +15,6 @@ static LIB_DIR: RelPath = RelPath::DIST.join("lib");
15
15
16
16
pub ( crate ) fn build_sysroot (
17
17
dirs : & Dirs ,
18
- channel : & str ,
19
18
sysroot_kind : SysrootKind ,
20
19
cg_clif_dylib_src : & CodegenBackend ,
21
20
bootstrap_host_compiler : & Compiler ,
@@ -84,7 +83,6 @@ pub(crate) fn build_sysroot(
84
83
85
84
let host = build_sysroot_for_triple (
86
85
dirs,
87
- channel,
88
86
bootstrap_host_compiler. clone ( ) ,
89
87
& cg_clif_dylib_path,
90
88
sysroot_kind,
@@ -94,7 +92,6 @@ pub(crate) fn build_sysroot(
94
92
if !is_native {
95
93
build_sysroot_for_triple (
96
94
dirs,
97
- channel,
98
95
{
99
96
let mut bootstrap_target_compiler = bootstrap_host_compiler. clone ( ) ;
100
97
bootstrap_target_compiler. triple = target_triple. clone ( ) ;
@@ -167,7 +164,6 @@ pub(crate) static RTSTARTUP_SYSROOT: RelPath = RelPath::BUILD.join("rtstartup");
167
164
#[ must_use]
168
165
fn build_sysroot_for_triple (
169
166
dirs : & Dirs ,
170
- channel : & str ,
171
167
compiler : Compiler ,
172
168
cg_clif_dylib_path : & CodegenBackend ,
173
169
sysroot_kind : SysrootKind ,
@@ -176,9 +172,7 @@ fn build_sysroot_for_triple(
176
172
SysrootKind :: None => build_rtstartup ( dirs, & compiler)
177
173
. unwrap_or ( SysrootTarget { triple : compiler. triple , libs : vec ! [ ] } ) ,
178
174
SysrootKind :: Llvm => build_llvm_sysroot_for_triple ( compiler) ,
179
- SysrootKind :: Clif => {
180
- build_clif_sysroot_for_triple ( dirs, channel, compiler, cg_clif_dylib_path)
181
- }
175
+ SysrootKind :: Clif => build_clif_sysroot_for_triple ( dirs, compiler, cg_clif_dylib_path) ,
182
176
}
183
177
}
184
178
@@ -219,7 +213,6 @@ fn build_llvm_sysroot_for_triple(compiler: Compiler) -> SysrootTarget {
219
213
#[ must_use]
220
214
fn build_clif_sysroot_for_triple (
221
215
dirs : & Dirs ,
222
- channel : & str ,
223
216
mut compiler : Compiler ,
224
217
cg_clif_dylib_path : & CodegenBackend ,
225
218
) -> SysrootTarget {
@@ -231,7 +224,7 @@ fn build_clif_sysroot_for_triple(
231
224
target_libs. libs . extend ( rtstartup_target_libs. libs ) ;
232
225
}
233
226
234
- let build_dir = STANDARD_LIBRARY . target_dir ( dirs) . join ( & compiler. triple ) . join ( channel ) ;
227
+ let build_dir = STANDARD_LIBRARY . target_dir ( dirs) . join ( & compiler. triple ) . join ( "release" ) ;
235
228
236
229
if !config:: get_bool ( "keep_sysroot" ) {
237
230
// Cleanup the deps dir, but keep build scripts and the incremental cache for faster
@@ -252,12 +245,12 @@ fn build_clif_sysroot_for_triple(
252
245
// Necessary for MinGW to find rsbegin.o and rsend.o
253
246
rustflags. push ( "--sysroot" . to_owned ( ) ) ;
254
247
rustflags. push ( RTSTARTUP_SYSROOT . to_path ( dirs) . to_str ( ) . unwrap ( ) . to_owned ( ) ) ;
255
- if channel == "release" {
256
- // Incremental compilation by default disables mir inlining. This leads to both a decent
257
- // compile perf and a significant runtime perf regression. As such forcefully enable mir
258
- // inlining.
259
- rustflags. push ( "-Zinline-mir" . to_owned ( ) ) ;
260
- }
248
+
249
+ // Incremental compilation by default disables mir inlining. This leads to both a decent
250
+ // compile perf and a significant runtime perf regression. As such forcefully enable mir
251
+ // inlining.
252
+ rustflags. push ( "-Zinline-mir" . to_owned ( ) ) ;
253
+
261
254
if let Some ( prefix) = env:: var_os ( "CG_CLIF_STDLIB_REMAP_PATH_PREFIX" ) {
262
255
rustflags. push ( "--remap-path-prefix" . to_owned ( ) ) ;
263
256
rustflags. push ( format ! (
@@ -268,9 +261,7 @@ fn build_clif_sysroot_for_triple(
268
261
}
269
262
compiler. rustflags . extend ( rustflags) ;
270
263
let mut build_cmd = STANDARD_LIBRARY . build ( & compiler, dirs) ;
271
- if channel == "release" {
272
- build_cmd. arg ( "--release" ) ;
273
- }
264
+ build_cmd. arg ( "--release" ) ;
274
265
build_cmd. arg ( "--features" ) . arg ( "backtrace panic-unwind compiler-builtins-no-f16-f128" ) ;
275
266
build_cmd. env ( "CARGO_PROFILE_RELEASE_DEBUG" , "true" ) ;
276
267
build_cmd. env ( "__CARGO_DEFAULT_LIB_METADATA" , "cg_clif" ) ;
0 commit comments