Skip to content

Commit 1215b94

Browse files
committed
Cleanup
1 parent 1e65869 commit 1215b94

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

build_system/src/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,9 @@ fn test_libcore(env: &Env, args: &TestArg) -> Result<(), String> {
694694
let _ = remove_dir_all(path.join("target"));
695695
let mut env = env.clone();
696696
env.insert("RUSTC_LOG".to_string(), "rustc_codegen_ssa::back::link=info".to_string());
697-
let rustflags =
697+
/*let rustflags =
698698
env.entry("RUSTFLAGS".to_string())
699-
.or_default();
699+
.or_default();*/
700700
//rustflags.push_str(" -C link-arg=-Wl,--verbose");
701701
//rustflags.push_str(" -C link-arg=-Wl,--fatal-warnings");
702702
//rustflags.push_str(" -C link-arg=-Wl,--warn-unresolved-symbols");

src/back/write.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, Mo
66
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen};
77
use rustc_errors::DiagCtxtHandle;
88
use rustc_fs_util::link_or_copy;
9-
use rustc_session::config::{Lto, OutputType};
9+
use rustc_session::config::OutputType;
1010
use rustc_span::fatal_error::FatalError;
1111
use rustc_target::spec::SplitDebuginfo;
1212

@@ -96,7 +96,6 @@ pub(crate) unsafe fn codegen(
9696
if config.emit_obj == EmitObj::ObjectCode(BitcodeSection::Full) {
9797
// TODO: we might want to emit to emit an error here, saying to set the
9898
// environment variable EMBED_LTO_BITCODE.
99-
unreachable!();
10099
let _timer = cgcx
101100
.prof
102101
.generic_activity_with_arg("GCC_module_codegen_embed_bitcode", &*module.name);
@@ -233,16 +232,11 @@ pub(crate) fn save_temp_bitcode(
233232

234233
fn create_msvc_imps<'gcc>(
235234
cgcx: &CodegenContext<GccCodegenBackend>,
236-
context: &Context<'gcc>,
235+
_context: &Context<'gcc>,
237236
) {
238237
if !cgcx.msvc_imps_needed {
239238
return;
240239
}
241-
// The x86 ABI seems to require that leading underscores are added to symbol
242-
// names, so we need an extra underscore on x86. There's also a leading
243-
// '\x01' here which disables LLVM's symbol mangling (e.g., no extra
244-
// underscores added in front).
245-
let prefix = if cgcx.target_arch == "x86" { "\x01__imp__" } else { "\x01__imp_" };
246240

247241
/*unsafe {
248242
let ptr_ty = Type::ptr_llcx(llcx);

src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#[cfg(feature = "master")]
22
use gccjit::{FnAttribute, VarAttribute, Visibility};
3-
use gccjit::{Function, FunctionType, GlobalKind, LValue, RValue, ToRValue, Type};
3+
use gccjit::{Function, GlobalKind, LValue, RValue, ToRValue, Type};
44
use rustc_codegen_ssa::traits::{
55
BaseTypeCodegenMethods, ConstCodegenMethods, StaticCodegenMethods,
66
};

0 commit comments

Comments
 (0)