Skip to content

Commit 7285096

Browse files
committed
---
yaml --- r: 183718 b: refs/heads/beta c: 194d96e h: refs/heads/master v: v3
1 parent 6d2c5a3 commit 7285096

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
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 4f1411197bdc7c8c120a951ca340d205d266da12
34+
refs/heads/beta: 194d96e5c3b3bf069ff791813641b7d22f4f42e9
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f

branches/beta/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/beta/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/beta/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/beta/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)