File tree 1 file changed +6
-5
lines changed
compiler/rustc_codegen_ssa/src/back
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
130
130
} ;
131
131
132
132
let mut file = write:: Object :: new ( binary_format, architecture, endianness) ;
133
- match architecture {
133
+ let e_flags = match architecture {
134
134
Architecture :: Mips => {
135
135
let arch = match sess. target . options . cpu . as_ref ( ) {
136
136
"mips1" => elf:: EF_MIPS_ARCH_1 ,
@@ -149,7 +149,7 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
149
149
if sess. target . options . cpu . contains ( "r6" ) {
150
150
e_flags |= elf:: EF_MIPS_NAN2008 ;
151
151
}
152
- file . flags = FileFlags :: Elf { e_flags } ;
152
+ e_flags
153
153
}
154
154
Architecture :: Mips64 => {
155
155
// copied from `mips64el-linux-gnuabi64-gcc foo.c -c`
@@ -160,17 +160,18 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
160
160
} else {
161
161
elf:: EF_MIPS_ARCH_64R2
162
162
} ;
163
- file . flags = FileFlags :: Elf { e_flags } ;
163
+ e_flags
164
164
}
165
165
Architecture :: Riscv64 if sess. target . options . features . contains ( "+d" ) => {
166
166
// copied from `riscv64-linux-gnu-gcc foo.c -c`, note though
167
167
// that the `+d` target feature represents whether the double
168
168
// float abi is enabled.
169
169
let e_flags = elf:: EF_RISCV_RVC | elf:: EF_RISCV_FLOAT_ABI_DOUBLE ;
170
- file . flags = FileFlags :: Elf { e_flags } ;
170
+ e_flags
171
171
}
172
- _ => { }
172
+ _ => 0 ,
173
173
} ;
174
+ file. flags = FileFlags :: Elf { e_flags } ;
174
175
Some ( file)
175
176
}
176
177
You can’t perform that action at this time.
0 commit comments