Skip to content

Commit d702d20

Browse files
committed
---
yaml --- r: 210019 b: refs/heads/try c: ba2380d h: refs/heads/master i: 210017: c3168e9 210015: d3c82e0 v: v3
1 parent 1023e8f commit d702d20

27 files changed

+32
-3
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: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 681fc824569cc2d37522b9927b9a6ecbfffee3eb
5+
refs/heads/try: ba2380d7b328ae59261d134970593c2a2668c690
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc/session/config.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ pub fn default_configuration(sess: &Session) -> ast::CrateConfig {
621621
let arch = &sess.target.target.arch;
622622
let wordsz = &sess.target.target.target_pointer_width;
623623
let os = &sess.target.target.target_os;
624+
let env = &sess.target.target.target_env;
624625

625626
let fam = match sess.target.target.options.is_like_windows {
626627
true => InternedString::new("windows"),
@@ -634,8 +635,8 @@ pub fn default_configuration(sess: &Session) -> ast::CrateConfig {
634635
mk(InternedString::new("target_family"), fam),
635636
mk(InternedString::new("target_arch"), intern(arch)),
636637
mk(InternedString::new("target_endian"), intern(end)),
637-
mk(InternedString::new("target_pointer_width"),
638-
intern(wordsz))
638+
mk(InternedString::new("target_pointer_width"), intern(wordsz)),
639+
mk(InternedString::new("target_env"), intern(env)),
639640
];
640641
if sess.opts.debug_assertions {
641642
ret.push(attr::mk_word_item(InternedString::new("debug_assertions")));

branches/try/src/librustc_back/target/aarch64_apple_ios.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub fn target() -> Target {
2222
target_pointer_width: "64".to_string(),
2323
arch: "aarch64".to_string(),
2424
target_os: "ios".to_string(),
25+
target_env: "".to_string(),
2526
options: TargetOptions {
2627
features: "+neon,+fp-armv8,+cyclone".to_string(),
2728
eliminate_frame_pointer: false,

branches/try/src/librustc_back/target/aarch64_linux_android.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub fn target() -> Target {
2424
target_pointer_width: "64".to_string(),
2525
arch: "aarch64".to_string(),
2626
target_os: "android".to_string(),
27+
target_env: "".to_string(),
2728
options: base,
2829
}
2930
}

branches/try/src/librustc_back/target/aarch64_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub fn target() -> Target {
1919
llvm_target: "aarch64-unknown-linux-gnu".to_string(),
2020
target_endian: "little".to_string(),
2121
target_pointer_width: "64".to_string(),
22+
target_env: "gnu".to_string(),
2223
arch: "aarch64".to_string(),
2324
target_os: "linux".to_string(),
2425
options: base,

branches/try/src/librustc_back/target/arm_linux_androideabi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub fn target() -> Target {
3131
target_pointer_width: "32".to_string(),
3232
arch: "arm".to_string(),
3333
target_os: "android".to_string(),
34+
target_env: "gnu".to_string(),
3435
options: base,
3536
}
3637
}

branches/try/src/librustc_back/target/arm_unknown_linux_gnueabi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn target() -> Target {
2323
target_pointer_width: "32".to_string(),
2424
arch: "arm".to_string(),
2525
target_os: "linux".to_string(),
26+
target_env: "gnueabi".to_string(),
2627

2728
options: TargetOptions {
2829
features: "+v6".to_string(),

branches/try/src/librustc_back/target/arm_unknown_linux_gnueabihf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn target() -> Target {
2323
target_pointer_width: "32".to_string(),
2424
arch: "arm".to_string(),
2525
target_os: "linux".to_string(),
26+
target_env: "gnueabihf".to_string(),
2627

2728
options: TargetOptions {
2829
features: "+v6,+vfp2".to_string(),

branches/try/src/librustc_back/target/armv7_apple_ios.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub fn target() -> Target {
1919
target_pointer_width: "32".to_string(),
2020
arch: "arm".to_string(),
2121
target_os: "ios".to_string(),
22+
target_env: "".to_string(),
2223
options: TargetOptions {
2324
features: "+v7,+vfp3,+neon".to_string(),
2425
.. opts(Arch::Armv7)

branches/try/src/librustc_back/target/armv7s_apple_ios.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub fn target() -> Target {
1919
target_pointer_width: "32".to_string(),
2020
arch: "arm".to_string(),
2121
target_os: "ios".to_string(),
22+
target_env: "".to_string(),
2223
options: TargetOptions {
2324
features: "+v7,+vfp4,+neon".to_string(),
2425
.. opts(Arch::Armv7s)

branches/try/src/librustc_back/target/i386_apple_ios.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn target() -> Target {
2323
target_pointer_width: "32".to_string(),
2424
arch: "x86".to_string(),
2525
target_os: "ios".to_string(),
26+
target_env: "".to_string(),
2627
options: opts(Arch::I386)
2728
}
2829
}

branches/try/src/librustc_back/target/i686_apple_darwin.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub fn target() -> Target {
2626
target_pointer_width: "32".to_string(),
2727
arch: "x86".to_string(),
2828
target_os: "macos".to_string(),
29+
target_env: "".to_string(),
2930
options: base,
3031
}
3132
}

branches/try/src/librustc_back/target/i686_pc_windows_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pub fn target() -> Target {
3030
target_pointer_width: "32".to_string(),
3131
arch: "x86".to_string(),
3232
target_os: "windows".to_string(),
33+
target_env: "gnu".to_string(),
3334
options: options,
3435
}
3536
}

branches/try/src/librustc_back/target/i686_unknown_dragonfly.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub fn target() -> Target {
2222
target_pointer_width: "32".to_string(),
2323
arch: "x86".to_string(),
2424
target_os: "dragonfly".to_string(),
25+
target_env: "".to_string(),
2526
options: base,
2627
}
2728
}

branches/try/src/librustc_back/target/i686_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub fn target() -> Target {
2222
target_pointer_width: "32".to_string(),
2323
arch: "x86".to_string(),
2424
target_os: "linux".to_string(),
25+
target_env: "gnu".to_string(),
2526
options: base,
2627
}
2728
}

branches/try/src/librustc_back/target/mips_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub fn target() -> Target {
2222
target_pointer_width: "32".to_string(),
2323
arch: "mips".to_string(),
2424
target_os: "linux".to_string(),
25+
target_env: "gnu".to_string(),
2526
options: super::linux_base::opts()
2627
}
2728
}

branches/try/src/librustc_back/target/mipsel_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub fn target() -> Target {
2222
target_pointer_width: "32".to_string(),
2323
arch: "mips".to_string(),
2424
target_os: "linux".to_string(),
25+
target_env: "gnu".to_string(),
2526

2627
options: super::linux_base::opts()
2728
}

branches/try/src/librustc_back/target/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ pub struct Target {
100100
pub target_pointer_width: String,
101101
/// OS name to use for conditional compilation.
102102
pub target_os: String,
103+
/// Environment name to use for conditional compilation.
104+
pub target_env: String,
103105
/// Architecture to use for ABI considerations. Valid options: "x86", "x86_64", "arm",
104106
/// "aarch64", "mips", and "powerpc". "mips" includes "mipsel".
105107
pub arch: String,
@@ -250,6 +252,8 @@ impl Target {
250252
target_pointer_width: get_req_field("target-pointer-width"),
251253
arch: get_req_field("arch"),
252254
target_os: get_req_field("os"),
255+
target_env: obj.find("env").and_then(|s| s.as_string())
256+
.map(|s| s.to_string()).unwrap_or(String::new()),
253257
options: Default::default(),
254258
};
255259

branches/try/src/librustc_back/target/powerpc_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub fn target() -> Target {
2121
target_pointer_width: "32".to_string(),
2222
arch: "powerpc".to_string(),
2323
target_os: "linux".to_string(),
24+
target_env: "gnu".to_string(),
2425
options: base,
2526
}
2627
}

branches/try/src/librustc_back/target/x86_64_apple_darwin.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub fn target() -> Target {
2525
target_pointer_width: "64".to_string(),
2626
arch: "x86_64".to_string(),
2727
target_os: "macos".to_string(),
28+
target_env: "".to_string(),
2829
options: base,
2930
}
3031
}

branches/try/src/librustc_back/target/x86_64_apple_ios.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub fn target() -> Target {
2121
target_pointer_width: "64".to_string(),
2222
arch: "x86_64".to_string(),
2323
target_os: "ios".to_string(),
24+
target_env: "".to_string(),
2425
options: opts(Arch::X86_64)
2526
}
2627
}

branches/try/src/librustc_back/target/x86_64_pc_windows_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub fn target() -> Target {
2727
target_pointer_width: "64".to_string(),
2828
arch: "x86_64".to_string(),
2929
target_os: "windows".to_string(),
30+
target_env: "gnu".to_string(),
3031
options: base,
3132
}
3233
}

branches/try/src/librustc_back/target/x86_64_unknown_bitrig.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn target() -> Target {
2323
target_pointer_width: "64".to_string(),
2424
arch: "x86_64".to_string(),
2525
target_os: "bitrig".to_string(),
26+
target_env: "".to_string(),
2627
options: base,
2728
}
2829
}

branches/try/src/librustc_back/target/x86_64_unknown_dragonfly.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub fn target() -> Target {
2424
target_pointer_width: "64".to_string(),
2525
arch: "x86_64".to_string(),
2626
target_os: "dragonfly".to_string(),
27+
target_env: "".to_string(),
2728
options: base,
2829
}
2930
}

branches/try/src/librustc_back/target/x86_64_unknown_freebsd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub fn target() -> Target {
2424
target_pointer_width: "64".to_string(),
2525
arch: "x86_64".to_string(),
2626
target_os: "freebsd".to_string(),
27+
target_env: "".to_string(),
2728
options: base,
2829
}
2930
}

branches/try/src/librustc_back/target/x86_64_unknown_linux_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub fn target() -> Target {
2424
target_pointer_width: "64".to_string(),
2525
arch: "x86_64".to_string(),
2626
target_os: "linux".to_string(),
27+
target_env: "gnu".to_string(),
2728
options: base,
2829
}
2930
}

branches/try/src/librustc_back/target/x86_64_unknown_openbsd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pub fn target() -> Target {
2323
target_pointer_width: "64".to_string(),
2424
arch: "x86_64".to_string(),
2525
target_os: "openbsd".to_string(),
26+
target_env: "".to_string(),
2627
options: base,
2728
}
2829
}

0 commit comments

Comments
 (0)