1 use crate::spec::{LinkerFlavor, TargetOptions};
3 pub fn opts() -> TargetOptions {
4 let mut base = super::linux_base::opts();
5 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.
9 .entry(LinkerFlavor::Gcc)
11 .push("-Wl,--allow-multiple-definition".to_string());
12 base.dwarf_version = Some(2);
13 base.position_independent_executables = true;
14 base.has_thread_local = false;
15 // This is for backward compatibility, see https://github.com/rust-lang/rust/issues/49867
16 // for context. (At that time, there was no `-C force-unwind-tables`, so the only solution
17 // was to always emit `uwtable`).
18 base.default_uwtable = true;
19 base.crt_static_respected = false;