File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 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 {
1414 let mut base = super :: windows_msvc_base:: opts ( ) ;
1515
1616 // 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.
1723 base. pre_link_args . get_mut ( & LinkerFlavor :: Msvc ) . unwrap ( ) . push (
1824 "/OPT:NOLBR" . to_string ( ) ) ;
1925
26+ // FIXME(jordanrh): use PanicStrategy::Unwind when SEH is
27+ // implemented for windows/arm in LLVM
2028 base. panic_strategy = PanicStrategy :: Abort ;
2129
2230 Ok ( Target {
You can’t perform that action at this time.
0 commit comments