Skip to content

Commit a39b243

Browse files
authored
Rollup merge of #83822 - petrochenkov:linkandro, r=davidtwco
rustc_target: Remove compiler-rt linking hack on Android `compiler-rt` did some significant work last year trying to eliminate this kind of duplicated symbols, so the flag may be no longer necessary. Tested locally with AArch64 Android, seems to work, CI will check the rest of the targets.
2 parents 861b0fb + 6ac2080 commit a39b243

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/rustc_target/src/spec/android_base.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
use crate::spec::{LinkerFlavor, TargetOptions};
1+
use crate::spec::TargetOptions;
22

33
pub fn opts() -> TargetOptions {
44
let mut base = super::linux_gnu_base::opts();
55
base.os = "android".to_string();
6-
// Many of the symbols defined in compiler-rt are also defined in libgcc.
7-
// Android's linker doesn't like that by default.
8-
base.pre_link_args
9-
.entry(LinkerFlavor::Gcc)
10-
.or_default()
11-
.push("-Wl,--allow-multiple-definition".to_string());
126
base.dwarf_version = Some(2);
137
base.position_independent_executables = true;
148
base.has_elf_tls = false;

0 commit comments

Comments
 (0)