@@ -987,6 +987,11 @@ pub struct TargetOptions {
987
987
/// Whether to use legacy .ctors initialization hooks rather than .init_array. Defaults
988
988
/// to false (uses .init_array).
989
989
pub use_ctors_section : bool ,
990
+
991
+ /// Whether the linker is instructed to add a `GNU_EH_FRAME` ELF header
992
+ /// used to locate unwinding information is passed
993
+ /// (only has effect if the linker is `ld`-like).
994
+ pub eh_frame_header : bool ,
990
995
}
991
996
992
997
impl Default for TargetOptions {
@@ -1078,6 +1083,7 @@ impl Default for TargetOptions {
1078
1083
relax_elf_relocations : false ,
1079
1084
llvm_args : vec ! [ ] ,
1080
1085
use_ctors_section : false ,
1086
+ eh_frame_header : true ,
1081
1087
}
1082
1088
}
1083
1089
}
@@ -1470,6 +1476,7 @@ impl Target {
1470
1476
key ! ( relax_elf_relocations, bool ) ;
1471
1477
key ! ( llvm_args, list) ;
1472
1478
key ! ( use_ctors_section, bool ) ;
1479
+ key ! ( eh_frame_header, bool ) ;
1473
1480
1474
1481
// NB: The old name is deprecated, but support for it is retained for
1475
1482
// compatibility.
@@ -1707,6 +1714,7 @@ impl ToJson for Target {
1707
1714
target_option_val ! ( relax_elf_relocations) ;
1708
1715
target_option_val ! ( llvm_args) ;
1709
1716
target_option_val ! ( use_ctors_section) ;
1717
+ target_option_val ! ( eh_frame_header) ;
1710
1718
1711
1719
if default. unsupported_abis != self . options . unsupported_abis {
1712
1720
d. insert (
0 commit comments