Skip to content

Commit a476163

Browse files
authored
Rollup merge of #41657 - malbarbo:android-armv7-linker, r=alexcrichton
Add -march=armv7-a parameter to armv7 android linker Without this option, the linker fails to link any library that uses `std::future`. The error points some undefined references, like `std::__future_base::_Result_base`. For example, it fails to link rustc because llvm 4.0 uses `std::future`. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
2 parents c386832 + 9896483 commit a476163

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_back/target/armv7_linux_androideabi.rs

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ pub fn target() -> TargetResult {
1818
let mut base = super::android_base::opts();
1919
base.features = "+v7,+thumb2,+vfp3,+d16,-neon".to_string();
2020
base.max_atomic_width = Some(64);
21+
base.pre_link_args
22+
.get_mut(&LinkerFlavor::Gcc).unwrap().push("-march=armv7-a".to_string());
2123

2224
Ok(Target {
2325
llvm_target: "armv7-none-linux-android".to_string(),

0 commit comments

Comments
 (0)