Skip to content

Commit aeefe7c

Browse files
committed
---
yaml --- r: 144383 b: refs/heads/try2 c: 6a05aa6 h: refs/heads/master i: 144381: 29feb4e 144379: cec1247 144375: 0726df0 144367: 8d1ef1b 144351: 3cf2b3b 144319: ae43263 144255: 8945699 144127: 0cebff3 143871: 5ce4cfa 143359: 15fac79 v: v3
1 parent f33b42c commit aeefe7c

File tree

6 files changed

+14
-37
lines changed

6 files changed

+14
-37
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: cfd0bfbd1165294fd33b1ac24e6696d4c6ceb0ca
8+
refs/heads/try2: 6a05aa6a203189658d0d63ceab91bdc88734e83b
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/back/arm.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use driver::session::sess_os_to_meta_os;
1313
use driver::session;
1414
use metadata::loader::meta_section_name;
1515

16-
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
16+
pub fn get_target_strs(target_triple: ~str, target_os: session::os) -> target_strs::t {
1717
return target_strs::t {
1818
module_asm: ~"",
1919

@@ -61,13 +61,7 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
6161
}
6262
},
6363

64-
target_triple: match target_os {
65-
session::os_macos => ~"arm-apple-darwin",
66-
session::os_win32 => ~"arm-pc-mingw32",
67-
session::os_linux => ~"arm-unknown-linux-gnueabihf",
68-
session::os_android => ~"arm-linux-androideabi",
69-
session::os_freebsd => ~"arm-unknown-freebsd"
70-
},
64+
target_triple: target_triple,
7165

7266
cc_args: ~[~"-marm"]
7367
};

branches/try2/src/librustc/back/mips.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use driver::session;
1313
use driver::session::sess_os_to_meta_os;
1414
use metadata::loader::meta_section_name;
1515

16-
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
16+
pub fn get_target_strs(target_triple: ~str, target_os: session::os) -> target_strs::t {
1717
return target_strs::t {
1818
module_asm: ~"",
1919

@@ -61,13 +61,7 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
6161
}
6262
},
6363

64-
target_triple: match target_os {
65-
session::os_macos => ~"mips-apple-darwin",
66-
session::os_win32 => ~"mips-pc-mingw32",
67-
session::os_linux => ~"mips-unknown-linux-gnu",
68-
session::os_android => ~"mips-unknown-android-gnu",
69-
session::os_freebsd => ~"mips-unknown-freebsd"
70-
},
64+
target_triple: target_triple,
7165

7266
cc_args: ~[]
7367
};

branches/try2/src/librustc/back/x86.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use driver::session::sess_os_to_meta_os;
1414
use driver::session;
1515
use metadata::loader::meta_section_name;
1616

17-
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
17+
pub fn get_target_strs(target_triple: ~str, target_os: session::os) -> target_strs::t {
1818
return target_strs::t {
1919
module_asm: ~"",
2020

@@ -44,13 +44,7 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
4444
}
4545
},
4646

47-
target_triple: match target_os {
48-
session::os_macos => ~"i686-apple-darwin",
49-
session::os_win32 => ~"i686-pc-mingw32",
50-
session::os_linux => ~"i686-unknown-linux-gnu",
51-
session::os_android => ~"i686-unknown-android-gnu",
52-
session::os_freebsd => ~"i686-unknown-freebsd"
53-
},
47+
target_triple: target_triple,
5448

5549
cc_args: ~[~"-m32"]
5650
};

branches/try2/src/librustc/back/x86_64.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use driver::session::sess_os_to_meta_os;
1414
use driver::session;
1515
use metadata::loader::meta_section_name;
1616

17-
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
17+
pub fn get_target_strs(target_triple: ~str, target_os: session::os) -> target_strs::t {
1818
return target_strs::t {
1919
module_asm: ~"",
2020

@@ -52,13 +52,7 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
5252
}
5353
},
5454

55-
target_triple: match target_os {
56-
session::os_macos => ~"x86_64-apple-darwin",
57-
session::os_win32 => ~"x86_64-pc-mingw32",
58-
session::os_linux => ~"x86_64-unknown-linux-gnu",
59-
session::os_android => ~"x86_64-unknown-android-gnu",
60-
session::os_freebsd => ~"x86_64-unknown-freebsd",
61-
},
55+
target_triple: target_triple,
6256

6357
cc_args: ~[~"-m64"]
6458
};

branches/try2/src/librustc/driver/driver.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,11 +570,12 @@ pub fn build_target_config(sopts: @session::options,
570570
abi::Arm => (ast::ty_i32, ast::ty_u32, ast::ty_f64),
571571
abi::Mips => (ast::ty_i32, ast::ty_u32, ast::ty_f64)
572572
};
573+
let target_triple = sopts.target_triple.clone();
573574
let target_strs = match arch {
574-
abi::X86 => x86::get_target_strs(os),
575-
abi::X86_64 => x86_64::get_target_strs(os),
576-
abi::Arm => arm::get_target_strs(os),
577-
abi::Mips => mips::get_target_strs(os)
575+
abi::X86 => x86::get_target_strs(target_triple, os),
576+
abi::X86_64 => x86_64::get_target_strs(target_triple, os),
577+
abi::Arm => arm::get_target_strs(target_triple, os),
578+
abi::Mips => mips::get_target_strs(target_triple, os)
578579
};
579580
let target_cfg = @session::config {
580581
os: os,

0 commit comments

Comments
 (0)