Skip to content

Commit d904596

Browse files
committed
---
yaml --- r: 232700 b: refs/heads/try c: 7472886 h: refs/heads/master v: v3
1 parent 62b1ad9 commit d904596

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+928
-772
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 81c1d142d31736a8b65c111c3aa4a1a5723ee4e5
4+
refs/heads/try: 74728862339e156ecc10dd5a515f51bbaf9b4192
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ valopt python "" "set path to python"
602602
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
603603
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
604604
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path (deprecated)"
605+
valopt i686-linux-android-ndk "" "i686-linux-android NDK standalone path"
605606
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
606607
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
607608
valopt release-channel "dev" "the name of the release channel to build"
@@ -1693,6 +1694,7 @@ putvar CFG_LIBDIR_RELATIVE
16931694
putvar CFG_DISABLE_MANAGE_SUBMODULES
16941695
putvar CFG_AARCH64_LINUX_ANDROID_NDK
16951696
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
1697+
putvar CFG_I686_LINUX_ANDROID_NDK
16961698
putvar CFG_MANDIR
16971699

16981700
# Avoid spurious warnings from clang by feeding it original source on
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# i686-linux-android configuration
2+
CC_i686-linux-android=$(CFG_I686_LINUX_ANDROID_NDK)/bin/i686-linux-android-gcc
3+
CXX_i686-linux-android=$(CFG_I686_LINUX_ANDROID_NDK)/bin/i686-linux-android-g++
4+
CPP_i686-linux-android=$(CFG_I686_LINUX_ANDROID_NDK)/bin/i686-linux-android-gcc -E
5+
AR_i686-linux-android=$(CFG_I686_LINUX_ANDROID_NDK)/bin/i686-linux-android-ar
6+
CFG_LIB_NAME_i686-linux-android=lib$(1).so
7+
CFG_STATIC_LIB_NAME_i686-linux-android=lib$(1).a
8+
CFG_LIB_GLOB_i686-linux-android=lib$(1)-*.so
9+
CFG_LIB_DSYM_GLOB_i686-linux-android=lib$(1)-*.dylib.dSYM
10+
CFG_JEMALLOC_CFLAGS_i686-linux-android := -D__i686__ -DANDROID -D__ANDROID__ $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_i686-linux-android := -Wall -g -fPIC -D__i686__ -DANDROID -D__ANDROID__ $(CFLAGS)
12+
CFG_GCCISH_CXXFLAGS_i686-linux-android := -fno-rtti $(CXXFLAGS)
13+
CFG_GCCISH_LINK_FLAGS_i686-linux-android := -shared -fPIC -ldl -g -lm -lsupc++
14+
CFG_GCCISH_DEF_FLAG_i686-linux-android := -Wl,--export-dynamic,--dynamic-list=
15+
CFG_LLC_FLAGS_i686-linux-android :=
16+
CFG_INSTALL_NAME_i686-linux-android =
17+
CFG_EXE_SUFFIX_i686-linux-android :=
18+
CFG_WINDOWSY_i686-linux-android :=
19+
CFG_UNIXY_i686-linux-android := 1
20+
CFG_LDPATH_i686-linux-android :=
21+
CFG_RUN_i686-linux-android=
22+
CFG_RUN_TARG_i686-linux-android=
23+
RUSTC_FLAGS_i686-linux-android :=
24+
RUSTC_CROSS_FLAGS_i686-linux-android :=
25+
CFG_GNU_TRIPLE_i686-linux-android := i686-linux-android

branches/try/src/compiletest/compiletest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#![feature(str_char)]
2020
#![feature(test)]
2121
#![feature(vec_push_all)]
22+
#![feature(path_components_peek)]
2223

2324
#![deny(warnings)]
2425

branches/try/src/compiletest/runtest.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::fs::{self, File};
2525
use std::io::BufReader;
2626
use std::io::prelude::*;
2727
use std::net::TcpStream;
28-
use std::path::{Path, PathBuf};
28+
use std::path::{Path, PathBuf, Component};
2929
use std::process::{Command, Output, ExitStatus};
3030

3131
pub fn run(config: Config, testfile: &Path) {
@@ -952,6 +952,9 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
952952
// filename:line1:col1: line2:col2: *warning:* msg
953953
// where line1:col1: is the starting point, line2:col2:
954954
// is the ending point, and * represents ANSI color codes.
955+
//
956+
// This pattern is ambiguous on windows, because filename may contain
957+
// a colon, so any path prefix must be detected and removed first.
955958
for line in proc_res.stderr.lines() {
956959
let mut was_expected = false;
957960
let mut prev = 0;
@@ -1006,7 +1009,16 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
10061009
}
10071010
}
10081011

1009-
fn is_compiler_error_or_warning(line: &str) -> bool {
1012+
fn is_compiler_error_or_warning(mut line: &str) -> bool {
1013+
// Remove initial prefix which may contain a colon
1014+
let mut components = Path::new(line).components();
1015+
if let Some(Component::Prefix(_)) = components.peek() {
1016+
components.next();
1017+
}
1018+
1019+
// Safe as path was originally constructed from a &str ^
1020+
line = components.as_path().to_str().unwrap();
1021+
10101022
let mut i = 0;
10111023
return
10121024
scan_until_char(line, ':', &mut i) &&

branches/try/src/liblibc/lib.rs

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ pub use types::os::arch::extra::*;
102102
pub use consts::os::c95::*;
103103
pub use consts::os::posix88::*;
104104
pub use consts::os::posix01::*;
105+
pub use consts::os::posix08::*;
105106
pub use consts::os::bsd44::*;
106107
pub use consts::os::extra::*;
107108

@@ -466,18 +467,19 @@ pub mod types {
466467
pub type off_t = i32;
467468
pub type dev_t = u32;
468469
pub type ino_t = u32;
470+
469471
pub type pid_t = i32;
470472
pub type uid_t = u32;
471473
pub type gid_t = u32;
472474
pub type useconds_t = u32;
475+
473476
pub type mode_t = u16;
474477
pub type ssize_t = i32;
475478
}
476-
#[cfg(any(target_arch = "x86",
479+
#[cfg(any(all(any(target_arch = "arm", target_arch = "x86"),
480+
not(target_os = "android")),
477481
target_arch = "le32",
478-
target_arch = "powerpc",
479-
all(any(target_arch = "arm", target_arch = "x86"),
480-
not(target_os = "android"))))]
482+
target_arch = "powerpc"))]
481483
pub mod posix01 {
482484
use types::os::arch::c95::{c_short, c_long, time_t};
483485
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -523,12 +525,13 @@ pub mod types {
523525
pub __size: [u32; 9]
524526
}
525527
}
528+
526529
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
527-
target_os = "android"))]
530+
target_os = "android"))]
528531
pub mod posix01 {
529-
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
532+
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, c_long, time_t};
530533
use types::os::arch::c99::{c_longlong, c_ulonglong};
531-
use types::os::arch::posix88::{uid_t, gid_t, ino_t};
534+
use types::os::arch::posix88::{uid_t, gid_t};
532535

533536
pub type nlink_t = u16;
534537
pub type blksize_t = u32;
@@ -538,15 +541,15 @@ pub mod types {
538541
#[derive(Copy, Clone)] pub struct stat {
539542
pub st_dev: c_ulonglong,
540543
pub __pad0: [c_uchar; 4],
541-
pub __st_ino: ino_t,
544+
pub __st_ino: c_long,
542545
pub st_mode: c_uint,
543546
pub st_nlink: c_uint,
544547
pub st_uid: uid_t,
545548
pub st_gid: gid_t,
546549
pub st_rdev: c_ulonglong,
547550
pub __pad3: [c_uchar; 4],
548551
pub st_size: c_longlong,
549-
pub st_blksize: blksize_t,
552+
pub st_blksize: c_ulong,
550553
pub st_blocks: c_ulonglong,
551554
pub st_atime: time_t,
552555
pub st_atime_nsec: c_ulong,
@@ -568,6 +571,7 @@ pub mod types {
568571
pub __size: [u32; 9]
569572
}
570573
}
574+
571575
#[cfg(any(target_arch = "mips",
572576
target_arch = "mipsel"))]
573577
pub mod posix01 {
@@ -3608,6 +3612,8 @@ pub mod consts {
36083612
pub const RUSAGE_THREAD: c_int = 1;
36093613
}
36103614
pub mod posix08 {
3615+
use types::os::arch::c95::c_int;
3616+
pub const O_CLOEXEC: c_int = 0x80000;
36113617
}
36123618
#[cfg(any(target_arch = "arm",
36133619
target_arch = "aarch64",
@@ -4267,7 +4273,15 @@ pub mod consts {
42674273
pub const RUSAGE_CHILDREN: c_int = -1;
42684274
pub const RUSAGE_THREAD: c_int = 1;
42694275
}
4276+
#[cfg(target_os = "freebsd")]
42704277
pub mod posix08 {
4278+
use types::os::arch::c95::c_int;
4279+
pub const O_CLOEXEC: c_int = 0x100000;
4280+
}
4281+
#[cfg(target_os = "dragonfly")]
4282+
pub mod posix08 {
4283+
use types::os::arch::c95::c_int;
4284+
pub const O_CLOEXEC: c_int = 0x20000;
42714285
}
42724286
pub mod bsd44 {
42734287
use types::os::arch::c95::c_int;
@@ -4710,7 +4724,15 @@ pub mod consts {
47104724
pub const RUSAGE_CHILDREN: c_int = -1;
47114725
pub const RUSAGE_THREAD: c_int = 1;
47124726
}
4727+
#[cfg(any(target_os = "bitrig", target_os = "openbsd"))]
47134728
pub mod posix08 {
4729+
use types::os::arch::c95::c_int;
4730+
pub const O_CLOEXEC: c_int = 0x10000;
4731+
}
4732+
#[cfg(target_os = "netbsd")]
4733+
pub mod posix08 {
4734+
use types::os::arch::c95::c_int;
4735+
pub const O_CLOEXEC: c_int = 0x400000;
47144736
}
47154737
pub mod bsd44 {
47164738
use types::os::arch::c95::c_int;
@@ -5148,6 +5170,8 @@ pub mod consts {
51485170
pub const RUSAGE_THREAD: c_int = 1;
51495171
}
51505172
pub mod posix08 {
5173+
use types::os::arch::c95::c_int;
5174+
pub const O_CLOEXEC: c_int = 0x1000000;
51515175
}
51525176
pub mod bsd44 {
51535177
use types::os::arch::c95::c_int;

branches/try/src/librustc/metadata/tydecode.rs

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ impl<'a,'tcx> TyDecoder<'a,'tcx> {
207207
}
208208
'B' => {
209209
assert_eq!(self.next(), '[');
210+
// this is the wrong NodeId, but `param_id` is only accessed
211+
// by the receiver-matching code in collect, which won't
212+
// be going down this code path, and anyway I will kill it
213+
// the moment wfcheck becomes the standard.
210214
let node_id = self.parse_uint() as ast::NodeId;
211215
assert_eq!(self.next(), '|');
212216
let space = self.parse_param_space();
@@ -223,7 +227,7 @@ impl<'a,'tcx> TyDecoder<'a,'tcx> {
223227
}
224228
'f' => {
225229
assert_eq!(self.next(), '[');
226-
let scope = self.parse_destruction_scope_data();
230+
let scope = self.parse_scope();
227231
assert_eq!(self.next(), '|');
228232
let br = self.parse_bound_region();
229233
assert_eq!(self.next(), ']');
@@ -246,43 +250,44 @@ impl<'a,'tcx> TyDecoder<'a,'tcx> {
246250
}
247251

248252
fn parse_scope(&mut self) -> region::CodeExtent {
249-
match self.next() {
253+
self.tcx.region_maps.bogus_code_extent(match self.next() {
254+
// This creates scopes with the wrong NodeId. This isn't
255+
// actually a problem because scopes only exist *within*
256+
// functions, and functions aren't loaded until trans which
257+
// doesn't care about regions.
258+
//
259+
// May still be worth fixing though.
250260
'P' => {
251261
assert_eq!(self.next(), '[');
252262
let fn_id = self.parse_uint() as ast::NodeId;
253263
assert_eq!(self.next(), '|');
254264
let body_id = self.parse_uint() as ast::NodeId;
255265
assert_eq!(self.next(), ']');
256-
region::CodeExtent::ParameterScope {
266+
region::CodeExtentData::ParameterScope {
257267
fn_id: fn_id, body_id: body_id
258268
}
259269
}
260270
'M' => {
261271
let node_id = self.parse_uint() as ast::NodeId;
262-
region::CodeExtent::Misc(node_id)
272+
region::CodeExtentData::Misc(node_id)
263273
}
264274
'D' => {
265275
let node_id = self.parse_uint() as ast::NodeId;
266-
region::CodeExtent::DestructionScope(node_id)
276+
region::CodeExtentData::DestructionScope(node_id)
267277
}
268278
'B' => {
269279
assert_eq!(self.next(), '[');
270280
let node_id = self.parse_uint() as ast::NodeId;
271281
assert_eq!(self.next(), '|');
272-
let first_stmt_index = self.parse_uint();
282+
let first_stmt_index = self.parse_u32();
273283
assert_eq!(self.next(), ']');
274284
let block_remainder = region::BlockRemainder {
275285
block: node_id, first_statement_index: first_stmt_index,
276286
};
277-
region::CodeExtent::Remainder(block_remainder)
287+
region::CodeExtentData::Remainder(block_remainder)
278288
}
279289
_ => panic!("parse_scope: bad input")
280-
}
281-
}
282-
283-
fn parse_destruction_scope_data(&mut self) -> region::DestructionScopeData {
284-
let node_id = self.parse_uint() as ast::NodeId;
285-
region::DestructionScopeData::new(node_id)
290+
})
286291
}
287292

288293
fn parse_opt<T, F>(&mut self, f: F) -> Option<T>
@@ -619,6 +624,33 @@ impl<'a,'tcx> TyDecoder<'a,'tcx> {
619624
}
620625
}
621626

627+
pub fn parse_region_param_def(&mut self) -> ty::RegionParameterDef {
628+
let name = self.parse_name(':');
629+
let def_id = self.parse_def(NominalType);
630+
let space = self.parse_param_space();
631+
assert_eq!(self.next(), '|');
632+
let index = self.parse_u32();
633+
assert_eq!(self.next(), '|');
634+
let mut bounds = vec![];
635+
loop {
636+
match self.next() {
637+
'R' => bounds.push(self.parse_region()),
638+
'.' => { break; }
639+
c => {
640+
panic!("parse_region_param_def: bad bounds ('{}')", c)
641+
}
642+
}
643+
}
644+
ty::RegionParameterDef {
645+
name: name,
646+
def_id: def_id,
647+
space: space,
648+
index: index,
649+
bounds: bounds
650+
}
651+
}
652+
653+
622654
fn parse_object_lifetime_default(&mut self) -> ty::ObjectLifetimeDefault {
623655
match self.next() {
624656
'a' => ty::ObjectLifetimeDefault::Ambiguous,
@@ -717,4 +749,3 @@ fn parse_unsafety(c: char) -> ast::Unsafety {
717749
_ => panic!("parse_unsafety: bad unsafety {}", c)
718750
}
719751
}
720-

0 commit comments

Comments
 (0)