Skip to content

Commit 4769c05

Browse files
author
blake2-ppc
committed
---
yaml --- r: 78785 b: refs/heads/try c: b59d503 h: refs/heads/master i: 78783: b5c6de8 v: v3
1 parent 4554479 commit 4769c05

File tree

9 files changed

+276
-93
lines changed

9 files changed

+276
-93
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 25ed29a0edb3d48fef843a0b818ee68faf2252da
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
5-
refs/heads/try: bed84898fca9443f97fc3db17b0417c179d25803
5+
refs/heads/try: b59d50368e5223d9c66c7a64c5aeff2b8e9b343f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

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

Lines changed: 8 additions & 2 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_triple: ~str, target_os: session::os) -> target_strs::t {
16+
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
1717
return target_strs::t {
1818
module_asm: ~"",
1919

@@ -61,7 +61,13 @@ pub fn get_target_strs(target_triple: ~str, target_os: session::os) -> target_st
6161
}
6262
},
6363

64-
target_triple: target_triple,
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+
},
6571

6672
cc_args: ~[~"-marm"]
6773
};

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

Lines changed: 8 additions & 2 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_triple: ~str, target_os: session::os) -> target_strs::t {
16+
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
1717
return target_strs::t {
1818
module_asm: ~"",
1919

@@ -61,7 +61,13 @@ pub fn get_target_strs(target_triple: ~str, target_os: session::os) -> target_st
6161
}
6262
},
6363

64-
target_triple: target_triple,
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+
},
6571

6672
cc_args: ~[]
6773
};

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

Lines changed: 8 additions & 2 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_triple: ~str, target_os: session::os) -> target_strs::t {
17+
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
1818
return target_strs::t {
1919
module_asm: ~"",
2020

@@ -44,7 +44,13 @@ pub fn get_target_strs(target_triple: ~str, target_os: session::os) -> target_st
4444
}
4545
},
4646

47-
target_triple: target_triple,
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+
},
4854

4955
cc_args: ~[~"-m32"]
5056
};

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

Lines changed: 8 additions & 2 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_triple: ~str, target_os: session::os) -> target_strs::t {
17+
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
1818
return target_strs::t {
1919
module_asm: ~"",
2020

@@ -52,7 +52,13 @@ pub fn get_target_strs(target_triple: ~str, target_os: session::os) -> target_st
5252
}
5353
},
5454

55-
target_triple: target_triple,
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+
},
5662

5763
cc_args: ~[~"-m64"]
5864
};

branches/try/src/librustc/driver/driver.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,11 @@ 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();
574573
let target_strs = match arch {
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)
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)
579578
};
580579
let target_cfg = @session::config {
581580
os: os,

0 commit comments

Comments
 (0)