Skip to content

Commit fd41c39

Browse files
committed
Expand comments in thumbv7a-pc-windows-msvc target spec
1 parent 54a16ae commit fd41c39

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs

+8
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)