File tree Expand file tree Collapse file tree 3 files changed +2
-17
lines changed Expand file tree Collapse file tree 3 files changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ codegen_gcc_unknown_ctarget_feature_prefix =
22 unknown feature specified for `-Ctarget-feature`: `{ $feature } `
33 .note = features must begin with a `+` to enable or `-` to disable it
44
5- codegen_gcc_invalid_minimum_alignment =
6- invalid minimum global alignment: { $err }
7-
85codegen_gcc_forbidden_ctarget_feature =
96 target feature `{ $feature } ` cannot be toggled with `-Ctarget-feature`: { $reason }
107
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ use rustc_span::def_id::DefId;
1818
1919use crate :: base;
2020use crate :: context:: CodegenCx ;
21- use crate :: errors:: InvalidMinimumAlignment ;
2221use crate :: type_of:: LayoutGccExt ;
2322
2423fn set_global_alignment < ' gcc , ' tcx > (
@@ -29,13 +28,8 @@ fn set_global_alignment<'gcc, 'tcx>(
2928 // The target may require greater alignment for globals than the type does.
3029 // Note: GCC and Clang also allow `__attribute__((aligned))` on variables,
3130 // which can force it to be smaller. Rust doesn't support this yet.
32- if let Some ( min) = cx. sess ( ) . target . min_global_align {
33- match Align :: from_bits ( min) {
34- Ok ( min) => align = align. max ( min) ,
35- Err ( err) => {
36- cx. sess ( ) . dcx ( ) . emit_err ( InvalidMinimumAlignment { err : err. to_string ( ) } ) ;
37- }
38- }
31+ if let Some ( min_global) = cx. sess ( ) . target . min_global_align {
32+ align = Ord :: max ( align, min_global) ;
3933 }
4034 gv. set_alignment ( align. bytes ( ) as i32 ) ;
4135}
Original file line number Diff line number Diff line change @@ -47,12 +47,6 @@ pub(crate) struct UnwindingInlineAsm {
4747 pub span : Span ,
4848}
4949
50- #[ derive( Diagnostic ) ]
51- #[ diag( codegen_gcc_invalid_minimum_alignment) ]
52- pub ( crate ) struct InvalidMinimumAlignment {
53- pub err : String ,
54- }
55-
5650#[ derive( Diagnostic ) ]
5751#[ diag( codegen_gcc_copy_bitcode) ]
5852pub ( crate ) struct CopyBitcode {
You can’t perform that action at this time.
0 commit comments