@@ -21,7 +21,8 @@ pub(crate) unsafe fn codegen(cgcx: &CodegenContext<GccCodegenBackend>, diag_hand
21
21
let module_name = module. name . clone ( ) ;
22
22
23
23
// println!("Module name: {}", module_name);
24
- let should_combine_object_files = module_name == "test_rust.3ab6d383-cgu.0" ;
24
+ // let should_combine_object_files = module_name == "test_rust.3ab6d383-cgu.0"; // With debug info.
25
+ let should_combine_object_files = module_name == "test_rust.8bd2b20a-cgu.0" ;
25
26
26
27
let module_name = Some ( & module_name[ ..] ) ;
27
28
@@ -57,8 +58,8 @@ pub(crate) unsafe fn codegen(cgcx: &CodegenContext<GccCodegenBackend>, diag_hand
57
58
context. add_command_line_option ( "-flto" ) ;
58
59
context. add_driver_option ( "-flto" ) ;
59
60
// TODO: use flto-partition=one?
60
- // context.add_command_line_option("-flto-partition=one");
61
- // context.add_driver_option("-flto-partition=one");
61
+ context. add_command_line_option ( "-flto-partition=one" ) ;
62
+ context. add_driver_option ( "-flto-partition=one" ) ;
62
63
if should_combine_object_files {
63
64
unimplemented ! ( ) ; // TODO: remove this line.
64
65
context. add_driver_option ( "-Wl,-r" ) ;
@@ -113,8 +114,8 @@ pub(crate) unsafe fn codegen(cgcx: &CodegenContext<GccCodegenBackend>, diag_hand
113
114
context. add_command_line_option ( "-flto" ) ;
114
115
context. add_driver_option ( "-flto" ) ;
115
116
// TODO: use flto-partition=one?
116
- // context.add_command_line_option("-flto-partition=one");
117
- // context.add_driver_option("-flto-partition=one");
117
+ context. add_command_line_option ( "-flto-partition=one" ) ;
118
+ context. add_driver_option ( "-flto-partition=one" ) ;
118
119
context. add_command_line_option ( "-ffat-lto-objects" ) ;
119
120
context. add_driver_option ( "-ffat-lto-objects" ) ;
120
121
// TODO: Send -plugin/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/liblto_plugin.so to linker (this should be done when specifying the appropriate rustc cli argument).
@@ -161,11 +162,11 @@ pub(crate) unsafe fn codegen(cgcx: &CodegenContext<GccCodegenBackend>, diag_hand
161
162
context. add_command_line_option ( "-flto" ) ;
162
163
context. add_driver_option ( "-flto" ) ;
163
164
// TODO: use flto-partition=one?
164
- // context.add_command_line_option("-flto-partition=one");
165
- // context.add_driver_option("-flto-partition=one");
165
+ context. add_command_line_option ( "-flto-partition=one" ) ;
166
+ context. add_driver_option ( "-flto-partition=one" ) ;
166
167
167
168
// let inner = context.new_child_context();
168
- context. add_driver_option ( "-v" ) ;
169
+ // context.add_driver_option("-v");
169
170
context. add_driver_option ( "-Wl,-r" ) ;
170
171
context. add_driver_option ( "-nostdlib" ) ;
171
172
context. add_driver_option ( "-fuse-linker-plugin" ) ;
0 commit comments