about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJordan Rhee <jordanrh@microsoft.com>2018-09-12 11:28:02 -0700
committerJordan Rhee <jordanrh@microsoft.com>2018-09-12 11:28:02 -0700
commitfd41c390534e15c223200031c93a10173046ebfa (patch)
tree1ed454949fab43cab69a971f5212e7867f58e236
parent54a16aea6a3b6a765ebf1821d339456c87f6e82c (diff)
Expand comments in thumbv7a-pc-windows-msvc target spec
-rw-r--r--src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs b/src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs
index a699e15d417..dab10ca241e 100644
--- a/src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs
+++ b/src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs
@@ -14,9 +14,17 @@ pub fn target() -> TargetResult {
     let mut base = super::windows_msvc_base::opts();
 
     // Prevent error LNK2013: BRANCH24(T) fixup overflow
+    // The LBR optimization tries to eliminate branch islands,
+    // but if the displacement is larger than can fit
+    // in the instruction, this error will occur. The linker
+    // should be smart enough to insert branch islands only
+    // where necessary, but this is not the observed behavior.
+    // Disabling the LBR optimization works around the issue.
     base.pre_link_args.get_mut(&LinkerFlavor::Msvc).unwrap().push(
         "/OPT:NOLBR".to_string());
 
+    // FIXME(jordanrh): use PanicStrategy::Unwind when SEH is
+    // implemented for windows/arm in LLVM
     base.panic_strategy = PanicStrategy::Abort;
 
     Ok(Target {