@@ -209,17 +209,6 @@ impl<'this> RustcCodegenFlags<'this> {
209
209
push_if_supported ( format ! ( "-mguard={cc_val}" ) . into ( ) ) ;
210
210
}
211
211
}
212
- // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-flto
213
- if let Some ( value) = self . lto {
214
- let cc_val = match value {
215
- "y" | "yes" | "on" | "true" | "fat" => Some ( "full" ) ,
216
- "thin" => Some ( "thin" ) ,
217
- _ => None ,
218
- } ;
219
- if let Some ( cc_val) = cc_val {
220
- push_if_supported ( format ! ( "-flto={cc_val}" ) . into ( ) ) ;
221
- }
222
- }
223
212
// https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fPIC
224
213
// https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fPIE
225
214
// https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mdynamic-no-pic
@@ -234,11 +223,6 @@ impl<'this> RustcCodegenFlags<'this> {
234
223
push_if_supported ( cc_flag. into ( ) ) ;
235
224
}
236
225
}
237
- // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fembed-bitcode
238
- if let Some ( value) = self . embed_bitcode {
239
- let cc_val = if value { "all" } else { "off" } ;
240
- push_if_supported ( format ! ( "-fembed-bitcode={cc_val}" ) . into ( ) ) ;
241
- }
242
226
// https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fno-omit-frame-pointer
243
227
// https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fomit-frame-pointer
244
228
if let Some ( value) = self . force_frame_pointers {
@@ -285,6 +269,24 @@ impl<'this> RustcCodegenFlags<'this> {
285
269
if let Some ( value) = self . profile_use {
286
270
push_if_supported ( format ! ( "-fprofile-use={value}" ) . into ( ) ) ;
287
271
}
272
+
273
+ // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fembed-bitcode
274
+ if let Some ( value) = self . embed_bitcode {
275
+ let cc_val = if value { "all" } else { "off" } ;
276
+ push_if_supported ( format ! ( "-fembed-bitcode={cc_val}" ) . into ( ) ) ;
277
+ }
278
+
279
+ // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-flto
280
+ if let Some ( value) = self . lto {
281
+ let cc_val = match value {
282
+ "y" | "yes" | "on" | "true" | "fat" => Some ( "full" ) ,
283
+ "thin" => Some ( "thin" ) ,
284
+ _ => None ,
285
+ } ;
286
+ if let Some ( cc_val) = cc_val {
287
+ push_if_supported ( format ! ( "-flto={cc_val}" ) . into ( ) ) ;
288
+ }
289
+ }
288
290
}
289
291
ToolFamily :: Gnu { .. } => { }
290
292
ToolFamily :: Msvc { .. } => {
0 commit comments