File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,17 @@ pub fn target() -> TargetResult {
14
14
let mut base = super :: windows_msvc_base:: opts ( ) ;
15
15
16
16
// Prevent error LNK2013: BRANCH24(T) fixup overflow
17
+ // The LBR optimization tries to eliminate branch islands,
18
+ // but if the displacement is larger than can fit
19
+ // in the instruction, this error will occur. The linker
20
+ // should be smart enough to insert branch islands only
21
+ // where necessary, but this is not the observed behavior.
22
+ // Disabling the LBR optimization works around the issue.
17
23
base. pre_link_args . get_mut ( & LinkerFlavor :: Msvc ) . unwrap ( ) . push (
18
24
"/OPT:NOLBR" . to_string ( ) ) ;
19
25
26
+ // FIXME(jordanrh): use PanicStrategy::Unwind when SEH is
27
+ // implemented for windows/arm in LLVM
20
28
base. panic_strategy = PanicStrategy :: Abort ;
21
29
22
30
Ok ( Target {
You can’t perform that action at this time.
0 commit comments