Skip to content

Commit 2df2032

Browse files
committed
---
yaml --- r: 181855 b: refs/heads/auto c: 194d96e h: refs/heads/master i: 181853: c4087f2 181851: b23be7a 181847: 843ef1e 181839: 345c913 181823: c53d29d v: v3
1 parent aee1f8e commit 2df2032

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 4f1411197bdc7c8c120a951ca340d205d266da12
13+
refs/heads/auto: 194d96e5c3b3bf069ff791813641b7d22f4f42e9
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc_back/target/aarch64_linux_android.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use target::Target;
1313
pub fn target() -> Target {
1414
let mut base = super::linux_base::opts();
1515
base.pre_link_args.push("-Wl,--allow-multiple-definition".to_string());
16+
base.is_like_android = true;
1617
base.position_independent_executables = true;
1718
Target {
1819
data_layout: "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\

branches/auto/src/librustc_back/target/arm_linux_androideabi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub fn target() -> Target {
1616
// Many of the symbols defined in compiler-rt are also defined in libgcc. Android
1717
// linker doesn't like that by default.
1818
base.pre_link_args.push("-Wl,--allow-multiple-definition".to_string());
19+
base.is_like_android = true;
1920
// FIXME #17437 (and #17448): Android doesn't support position dependent executables anymore.
2021
base.position_independent_executables = false;
2122

branches/auto/src/librustc_back/target/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ pub struct TargetOptions {
158158
/// only realy used for figuring out how to find libraries, since Windows uses its own
159159
/// library naming convention. Defaults to false.
160160
pub is_like_windows: bool,
161+
/// Whether the target toolchain is like Android's. Only useful for compiling against Android.
162+
/// Defaults to false.
163+
pub is_like_android: bool,
161164
/// Whether the linker support GNU-like arguments such as -O. Defaults to false.
162165
pub linker_is_gnu: bool,
163166
/// Whether the linker support rpaths or not. Defaults to false.
@@ -197,6 +200,7 @@ impl Default for TargetOptions {
197200
staticlib_suffix: ".a".to_string(),
198201
is_like_osx: false,
199202
is_like_windows: false,
203+
is_like_android: false,
200204
linker_is_gnu: false,
201205
has_rpath: false,
202206
no_compiler_rt: false,

branches/auto/src/librustc_trans/trans/debuginfo.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,9 @@ pub fn finalize(cx: &CrateContext) {
736736
// instruct LLVM to emit an older version of dwarf, however,
737737
// for OS X to understand. For more info see #11352
738738
// This can be overridden using --llvm-opts -dwarf-version,N.
739-
if cx.sess().target.target.options.is_like_osx {
739+
// Android has the same issue (#22398)
740+
if cx.sess().target.target.options.is_like_osx ||
741+
cx.sess().target.target.options.is_like_android {
740742
llvm::LLVMRustAddModuleFlag(cx.llmod(),
741743
"Dwarf Version\0".as_ptr() as *const _,
742744
2)

0 commit comments

Comments
 (0)