Skip to content

Commit 7b519d6

Browse files
committed
More cleanup
1 parent 1215b94 commit 7b519d6

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

build_system/src/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu
178178
//rustflags.push_str(" -Clink-arg=--ld-path=/usr/bin/mold");
179179
//rustflags.push_str(" -Clink-arg=--ld-path=/usr/bin/ld.bfd");
180180
//rustflags.push_str(" -Clink-arg=--ld-path=/usr/bin/ld.gold");
181-
env.insert("RUSTC_LOG".to_string(), "rustc_codegen_ssa::back::link=info".to_string());
181+
//env.insert("RUSTC_LOG".to_string(), "rustc_codegen_ssa::back::link=info".to_string());
182182
env.insert("RUSTFLAGS".to_string(), rustflags);
183183
run_command_with_output_and_env(&args, Some(&start_dir), Some(&env))?;
184184

build_system/src/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,8 @@ fn test_libcore(env: &Env, args: &TestArg) -> Result<(), String> {
692692
println!("[TEST] libcore");
693693
let path = get_sysroot_dir().join("sysroot_src/library/core/tests");
694694
let _ = remove_dir_all(path.join("target"));
695-
let mut env = env.clone();
696-
env.insert("RUSTC_LOG".to_string(), "rustc_codegen_ssa::back::link=info".to_string());
695+
/*let mut env = env.clone();
696+
env.insert("RUSTC_LOG".to_string(), "rustc_codegen_ssa::back::link=info".to_string());*/
697697
/*let rustflags =
698698
env.entry("RUSTFLAGS".to_string())
699699
.or_default();*/
@@ -718,7 +718,7 @@ fn test_libcore(env: &Env, args: &TestArg) -> Result<(), String> {
718718
//rustflags.push_str(" -C link-arg=-Wl,--trace-symbol=_ZN6memchr4arch6x86_646memchr10memchr_raw2FN17haaf621f7b8ca567eE");
719719
//rustflags.push_str(" -C link-arg=-Wl,--print-map");
720720
//rustflags.push_str(" -Clink-arg=-not-an-arg");
721-
run_cargo_command(&[&"test"], Some(&path), &env, args)?;
721+
run_cargo_command(&[&"test"], Some(&path), env, args)?;
722722
Ok(())
723723
}
724724

src/consts.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
9898
let var_name = format!("{:?}", global);
9999
if var_name.contains("FN") && var_name.contains("memchr") {
100100
//println!("Var name: {:?}", var_name);
101-
println!("INITIALIZE: {:?} = {:?}", var_name, value);
101+
//println!("INITIALIZE: {:?} = {:?}", var_name, value);
102102

103103
/*
104104
let ptr_type = value.get_type().make_pointer();
@@ -168,7 +168,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
168168
//let value = self.context.new_bitcast(None, value, fn_ptr_type); // Also WORKS
169169
let value = self.context.new_bitcast(None, value, val_llty);*/
170170
global.global_set_initializer_rvalue(value);
171-
println!("=== AFTER INITIALIZE");
171+
//println!("=== AFTER INITIALIZE");
172172
}
173173
else {
174174
global.global_set_initializer_rvalue(value);
@@ -329,9 +329,9 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
329329
}
330330

331331
let is_tls = fn_attrs.flags.contains(CodegenFnAttrFlags::THREAD_LOCAL);
332-
if sym.contains("memchr") && sym.contains("FN") {
332+
/*if sym.contains("memchr") && sym.contains("FN") {
333333
println!("** DECLARE");
334-
}
334+
}*/
335335
let global = self.declare_global(
336336
sym,
337337
gcc_type,

src/declare.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
7070
is_tls: bool,
7171
link_section: Option<Symbol>,
7272
) -> LValue<'gcc> {
73-
if name.contains("memchr") && name.contains("FN") {
73+
/*if name.contains("memchr") && name.contains("FN") {
7474
println!("{}: {:?}: {:?}", self.codegen_unit.name(), name, global_kind);
75-
}
75+
}*/
7676
let global = self.context.new_global(None, global_kind, ty, name);
7777
if is_tls {
7878
global.set_tls_model(self.tls_model);

src/mono_item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ impl<'gcc, 'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
3232
let gcc_type = self.layout_of(ty).gcc_type(self);
3333

3434
let is_tls = attrs.flags.contains(CodegenFnAttrFlags::THREAD_LOCAL);
35-
if symbol_name.contains("memchr") && symbol_name.contains("FN") {
35+
/*if symbol_name.contains("memchr") && symbol_name.contains("FN") {
3636
println!("** DECLARE static");
37-
}
37+
}*/
3838
let global = self.define_global(symbol_name, gcc_type, is_tls, attrs.link_section);
3939
#[cfg(feature = "master")]
4040
global.add_attribute(VarAttribute::Visibility(base::visibility_to_gcc(visibility)));

0 commit comments

Comments
 (0)