Skip to content

Commit a6d4b80

Browse files
committed
---
yaml --- r: 6277 b: refs/heads/master c: dd5512c h: refs/heads/master i: 6275: 2da7622 v: v3
1 parent d81f04e commit a6d4b80

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 47d875e00270d227a29d53e54ef6d1561608fbab
2+
refs/heads/master: dd5512ccb0ab15e695147d1060cba1d5171adffb

trunk/src/comp/driver/rustc.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@ fn default_configuration(sess: session::session, argv0: str, input: str) ->
2828

2929
let mk = attr::mk_name_value_item_str;
3030

31+
let arch = alt sess.get_targ_cfg().arch {
32+
session::arch_x86. { "x86" }
33+
session::arch_x86_64. { "x86_64" }
34+
session::arch_arm. { "arm" }
35+
};
36+
3137
ret [ // Target bindings.
3238
mk("target_os", std::os::target_os()),
33-
mk("target_arch", "x86"),
39+
mk("target_arch", arch),
3440
mk("target_libc", libc),
3541
// Build bindings.
3642
mk("build_compiler", argv0),
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#[cfg(target_arch = "x86")]
2+
fn main() { }
3+
4+
#[cfg(target_arch = "x86_64")]
5+
fn main() { }

0 commit comments

Comments
 (0)