Skip to content

Commit

Permalink
Rollup merge of rust-lang#44589 - makotokato:thumb2, r=alexcrichton
Browse files Browse the repository at this point in the history
Require +thumb-mode to generate thumb2 code for Android/armv7-a

I am investigating rust's code generation into Gecko by https://bugzilla.mozilla.org/show_bug.cgi?id=1399337.

armv7-linux-androideabi target uses `+v7,+thumb2,+vfp3,+d16,-neon` as target-feature.  But `+thumb2` only doesn't generate thumb2 code.  To generate thumb2 code, it requires `+thumb-mode`.  So we should add it for armv7-linux-androideabi.

r? @alexcrichton
  • Loading branch information
alexcrichton committed Sep 17, 2017
2 parents 1d08838 + 07494ec commit 0d88bb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_back/target/armv7_linux_androideabi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use target::{Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
let mut base = super::android_base::opts();
base.features = "+v7,+thumb2,+vfp3,+d16,-neon".to_string();
base.features = "+v7,+thumb-mode,+thumb2,+vfp3,+d16,-neon".to_string();
base.max_atomic_width = Some(64);
base.pre_link_args
.get_mut(&LinkerFlavor::Gcc).unwrap().push("-march=armv7-a".to_string());
Expand Down

0 comments on commit 0d88bb9

Please sign in to comment.