Skip to content

Commit 990285e

Browse files
Remove unneeded special case for rust CI
1 parent 1b504c0 commit 990285e

File tree

1 file changed

+11
-32
lines changed
  • compiler/rustc_codegen_gcc/build_system/src

1 file changed

+11
-32
lines changed

compiler/rustc_codegen_gcc/build_system/src/config.rs

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -377,39 +377,18 @@ impl ConfigInfo {
377377
"debug"
378378
};
379379

380-
let has_builtin_backend = env
381-
.get("BUILTIN_BACKEND")
382-
.map(|backend| !backend.is_empty())
383-
.unwrap_or(false);
384-
385380
let mut rustflags = Vec::new();
386-
if has_builtin_backend {
387-
// It means we're building inside the rustc testsuite, so some options need to be handled
388-
// a bit differently.
389-
self.cg_backend_path = "gcc".to_string();
390-
391-
match env.get("RUSTC_SYSROOT") {
392-
Some(rustc_sysroot) if !rustc_sysroot.is_empty() => {
393-
rustflags.extend_from_slice(&["--sysroot".to_string(), rustc_sysroot.clone()]);
394-
}
395-
_ => {}
396-
}
397-
// This should not be needed, but is necessary for the CI in the rust repository.
398-
// FIXME: Remove when the rust CI switches to the master version of libgccjit.
399-
rustflags.push("-Cpanic=abort".to_string());
400-
} else {
401-
self.cg_backend_path = current_dir
402-
.join("target")
403-
.join(channel)
404-
.join(&format!("librustc_codegen_gcc.{}", self.dylib_ext))
405-
.display()
406-
.to_string();
407-
self.sysroot_path = current_dir
408-
.join("build_sysroot/sysroot")
409-
.display()
410-
.to_string();
411-
rustflags.extend_from_slice(&["--sysroot".to_string(), self.sysroot_path.clone()]);
412-
};
381+
self.cg_backend_path = current_dir
382+
.join("target")
383+
.join(channel)
384+
.join(&format!("librustc_codegen_gcc.{}", self.dylib_ext))
385+
.display()
386+
.to_string();
387+
// self.sysroot_path = current_dir
388+
// .join("build_sysroot/sysroot")
389+
// .display()
390+
// .to_string();
391+
// rustflags.extend_from_slice(&["--sysroot".to_string(), self.sysroot_path.clone()]);
413392

414393
// This environment variable is useful in case we want to change options of rustc commands.
415394
if let Some(cg_rustflags) = env.get("CG_RUSTFLAGS") {

0 commit comments

Comments
 (0)