@@ -989,6 +989,11 @@ pub struct TargetOptions {
989989 /// Whether to use legacy .ctors initialization hooks rather than .init_array. Defaults
990990 /// to false (uses .init_array).
991991 pub use_ctors_section : bool ,
992+
993+ /// Whether the linker is instructed to add a `GNU_EH_FRAME` ELF header
994+ /// used to locate unwinding information is passed
995+ /// (only has effect if the linker is `ld`-like).
996+ pub eh_frame_header : bool ,
992997}
993998
994999impl Default for TargetOptions {
@@ -1081,6 +1086,7 @@ impl Default for TargetOptions {
10811086 relax_elf_relocations : false ,
10821087 llvm_args : vec ! [ ] ,
10831088 use_ctors_section : false ,
1089+ eh_frame_header : true ,
10841090 }
10851091 }
10861092}
@@ -1474,6 +1480,7 @@ impl Target {
14741480 key ! ( relax_elf_relocations, bool ) ;
14751481 key ! ( llvm_args, list) ;
14761482 key ! ( use_ctors_section, bool ) ;
1483+ key ! ( eh_frame_header, bool ) ;
14771484
14781485 // NB: The old name is deprecated, but support for it is retained for
14791486 // compatibility.
@@ -1712,6 +1719,7 @@ impl ToJson for Target {
17121719 target_option_val ! ( relax_elf_relocations) ;
17131720 target_option_val ! ( llvm_args) ;
17141721 target_option_val ! ( use_ctors_section) ;
1722+ target_option_val ! ( eh_frame_header) ;
17151723
17161724 if default. unsupported_abis != self . options . unsupported_abis {
17171725 d. insert (
0 commit comments