File tree 5 files changed +33
-22
lines changed
5 files changed +33
-22
lines changed Original file line number Diff line number Diff line change 11
11
use target:: Target ;
12
12
13
13
pub fn target ( ) -> Target {
14
- let mut base = super :: linux_base:: opts ( ) ;
15
- base. pre_link_args . push ( "-Wl,--allow-multiple-definition" . to_string ( ) ) ;
16
- base. is_like_android = true ;
17
- base. position_independent_executables = true ;
18
14
Target {
19
15
data_layout : "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\
20
16
f32:32:32-f64:64:64-v64:64:64-v128:128:128-a:0:64-\
@@ -25,6 +21,6 @@ pub fn target() -> Target {
25
21
arch : "aarch64" . to_string ( ) ,
26
22
target_os : "android" . to_string ( ) ,
27
23
target_env : "" . to_string ( ) ,
28
- options : base ,
24
+ options : super :: android_base :: opts ( ) ,
29
25
}
30
26
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ use target:: TargetOptions ;
12
+
13
+ pub fn opts ( ) -> TargetOptions {
14
+ let mut base = super :: linux_base:: opts ( ) ;
15
+ // Many of the symbols defined in compiler-rt are also defined in libgcc.
16
+ // Android's linker doesn't like that by default.
17
+ base. pre_link_args . push ( "-Wl,--allow-multiple-definition" . to_string ( ) ) ;
18
+ base. is_like_android = true ;
19
+ base. position_independent_executables = true ;
20
+ base
21
+ }
Original file line number Diff line number Diff line change 11
11
use target:: Target ;
12
12
13
13
pub fn target ( ) -> Target {
14
- let mut base = super :: linux_base :: opts ( ) ;
14
+ let mut base = super :: android_base :: opts ( ) ;
15
15
base. features = "+v7" . to_string ( ) ;
16
- // Many of the symbols defined in compiler-rt are also defined in libgcc. Android
17
- // linker doesn't like that by default.
18
- base. pre_link_args . push ( "-Wl,--allow-multiple-definition" . to_string ( ) ) ;
19
- base. is_like_android = true ;
20
- // FIXME #17437 (and #17448): Android doesn't support position dependent executables anymore.
21
- base. position_independent_executables = false ;
22
16
23
17
Target {
24
- data_layout : "e-p:32:32:32\
25
- -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
26
- -f32:32:32-f64:64:64\
27
- -v64:64:64-v128:64:128\
28
- -a:0:64-n32". to_string ( ) ,
18
+ data_layout : "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-\
19
+ f32:32:32-f64:64:64-v64:64:64-v128:64:128-a:0:64-\
20
+ n32". to_string ( ) ,
29
21
llvm_target : "arm-linux-androideabi" . to_string ( ) ,
30
22
target_endian : "little" . to_string ( ) ,
31
23
target_pointer_width : "32" . to_string ( ) ,
Original file line number Diff line number Diff line change 46
46
//! specified by the target, rather than replace.
47
47
48
48
use serialize:: json:: Json ;
49
- use syntax:: { diagnostic, abi} ;
50
49
use std:: default:: Default ;
51
50
use std:: io:: prelude:: * ;
51
+ use syntax:: { diagnostic, abi} ;
52
52
53
- mod windows_base;
54
- mod linux_base;
53
+ mod android_base;
55
54
mod apple_base;
56
55
mod apple_ios_base;
57
- mod freebsd_base;
58
- mod dragonfly_base;
59
56
mod bitrig_base;
57
+ mod dragonfly_base;
58
+ mod freebsd_base;
59
+ mod linux_base;
60
60
mod openbsd_base;
61
+ mod windows_base;
61
62
62
63
/// Everything `rustc` knows about how to compile for a specific target.
63
64
///
Original file line number Diff line number Diff line change 10
10
11
11
// no-pretty-expanded FIXME #15189
12
12
// ignore-windows FIXME #13259
13
+ // ignore-android FIXME #17520
13
14
14
15
use std:: env;
15
16
use std:: process:: { Command , Stdio } ;
You can’t perform that action at this time.
0 commit comments