File tree 4 files changed +44
-26
lines changed 4 files changed +44
-26
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2014-2015 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
+ use std:: default:: Default ;
13
+
14
+ pub fn opts ( ) -> TargetOptions {
15
+ TargetOptions {
16
+ linker : "cc" . to_string ( ) ,
17
+ dynamic_linking : true ,
18
+ executables : true ,
19
+ has_rpath : true ,
20
+ linker_is_gnu : true ,
21
+ .. Default :: default ( )
22
+ }
23
+ }
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- use target:: Target ;
12
- use target:: TargetOptions ;
13
- use std:: default:: Default ;
11
+ use target:: { Target , TargetResult } ;
14
12
15
- pub fn target ( ) -> Target {
16
- Target {
13
+ pub fn target ( ) -> TargetResult {
14
+ let mut base = super :: haiku_base:: opts ( ) ;
15
+ base. cpu = "pentium4" . to_string ( ) ;
16
+ base. max_atomic_width = 64 ;
17
+ base. pre_link_args . push ( "-m32" . to_string ( ) ) ;
18
+
19
+ Ok ( Target {
17
20
llvm_target : "i686-unknown-haiku" . to_string ( ) ,
18
21
target_endian : "little" . to_string ( ) ,
19
22
target_pointer_width : "32" . to_string ( ) ,
@@ -22,12 +25,6 @@ pub fn target() -> Target {
22
25
target_os : "haiku" . to_string ( ) ,
23
26
target_env : "" . to_string ( ) ,
24
27
target_vendor : "unknown" . to_string ( ) ,
25
- options : TargetOptions {
26
- linker : "cc" . to_string ( ) ,
27
- dynamic_linking : true ,
28
- executables : true ,
29
- has_rpath : true ,
30
- .. Default :: default ( )
31
- } ,
32
- }
28
+ options : base,
29
+ } )
33
30
}
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ mod apple_ios_base;
56
56
mod bitrig_base;
57
57
mod dragonfly_base;
58
58
mod freebsd_base;
59
+ mod haiku_base;
59
60
mod linux_base;
60
61
mod linux_musl_base;
61
62
mod openbsd_base;
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- use target:: Target ;
12
- use target:: TargetOptions ;
13
- use std:: default:: Default ;
11
+ use target:: { Target , TargetResult } ;
14
12
15
- pub fn target ( ) -> Target {
16
- Target {
13
+ pub fn target ( ) -> TargetResult {
14
+ let mut base = super :: haiku_base:: opts ( ) ;
15
+ base. cpu = "x86-64" . to_string ( ) ;
16
+ base. max_atomic_width = 64 ;
17
+ base. pre_link_args . push ( "-m64" . to_string ( ) ) ;
18
+
19
+ Ok ( Target {
17
20
llvm_target : "x86_64-unknown-haiku" . to_string ( ) ,
18
21
target_endian : "little" . to_string ( ) ,
19
22
target_pointer_width : "64" . to_string ( ) ,
@@ -22,12 +25,6 @@ pub fn target() -> Target {
22
25
target_os : "haiku" . to_string ( ) ,
23
26
target_env : "" . to_string ( ) ,
24
27
target_vendor : "unknown" . to_string ( ) ,
25
- options : TargetOptions {
26
- linker : "cc" . to_string ( ) ,
27
- dynamic_linking : true ,
28
- executables : true ,
29
- has_rpath : true ,
30
- .. Default :: default ( )
31
- } ,
32
- }
28
+ options : base,
29
+ } )
33
30
}
You can’t perform that action at this time.
0 commit comments