File tree Expand file tree Collapse file tree 4 files changed +44
-26
lines changed Expand file tree Collapse file tree 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 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- use target:: Target ;
12- use target:: TargetOptions ;
13- use std:: default:: Default ;
11+ use target:: { Target , TargetResult } ;
1412
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 {
1720 llvm_target : "i686-unknown-haiku" . to_string ( ) ,
1821 target_endian : "little" . to_string ( ) ,
1922 target_pointer_width : "32" . to_string ( ) ,
@@ -22,12 +25,6 @@ pub fn target() -> Target {
2225 target_os : "haiku" . to_string ( ) ,
2326 target_env : "" . to_string ( ) ,
2427 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+ } )
3330}
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ mod apple_ios_base;
5656mod bitrig_base;
5757mod dragonfly_base;
5858mod freebsd_base;
59+ mod haiku_base;
5960mod linux_base;
6061mod linux_musl_base;
6162mod openbsd_base;
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- use target:: Target ;
12- use target:: TargetOptions ;
13- use std:: default:: Default ;
11+ use target:: { Target , TargetResult } ;
1412
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 {
1720 llvm_target : "x86_64-unknown-haiku" . to_string ( ) ,
1821 target_endian : "little" . to_string ( ) ,
1922 target_pointer_width : "64" . to_string ( ) ,
@@ -22,12 +25,6 @@ pub fn target() -> Target {
2225 target_os : "haiku" . to_string ( ) ,
2326 target_env : "" . to_string ( ) ,
2427 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+ } )
3330}
You can’t perform that action at this time.
0 commit comments