Skip to content

Commit 469f196

Browse files
committed
---
yaml --- r: 64900 b: refs/heads/snap-stage3 c: 02f7f72 h: refs/heads/master v: v3
1 parent 7c9ccfb commit 469f196

File tree

3 files changed

+16
-26
lines changed

3 files changed

+16
-26
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8a737b502067b1896686bd1f9df7a1446296d80b
4+
refs/heads/snap-stage3: 02f7f72a9af16607f9c08989fe56d417842a24dd
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ opt docs 1 "build documentation"
371371
opt optimize 1 "build optimized rust code"
372372
opt optimize-cxx 1 "build optimized C++ code"
373373
opt optimize-llvm 1 "build optimized LLVM"
374+
opt llvm-assertions 1 "build LLVM with assertions"
374375
opt debug 0 "build with extra debug fun"
375376
opt ratchet-bench 0 "ratchet benchmarks"
376377
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
@@ -793,10 +794,17 @@ do
793794
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
794795
# Just use LLVM straight from its build directory to
795796
# avoid 'make install' time
796-
LLVM_INST_DIR=$LLVM_BUILD_DIR/Debug+Asserts
797+
LLVM_INST_DIR=$LLVM_BUILD_DIR/Debug
797798
else
798799
LLVM_DBG_OPTS="--enable-optimized"
799-
LLVM_INST_DIR=$LLVM_BUILD_DIR/Release+Asserts
800+
LLVM_INST_DIR=$LLVM_BUILD_DIR/Release
801+
fi
802+
if [ ! -z "$CFG_DISABLE_LLVM_ASSERTIONS" ]
803+
then
804+
LLVM_ASSERTION_OPTS="--disable-assertions"
805+
else
806+
LLVM_ASSERTION_OPTS="--enable-assertions"
807+
LLVM_INST_DIR=${LLVM_INST_DIR}+Asserts
800808
fi
801809
else
802810
msg "not reconfiguring LLVM, external LLVM root"
@@ -836,7 +844,7 @@ do
836844
LLVM_TARGET="--target=$t"
837845

838846
# Disable unused LLVM features
839-
LLVM_OPTS="$LLVM_DBG_OPTS --disable-docs --enable-bindings=none"
847+
LLVM_OPTS="$LLVM_DBG_OPTS $LLVM_ASSERTION_OPTS --disable-docs --enable-bindings=none"
840848

841849
case "$CFG_C_COMPILER" in
842850
("ccache clang")

branches/snap-stage3/src/libstd/path.rs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ impl GenericPath for PosixPath {
587587
}
588588

589589
fn with_filename(&self, f: &str) -> PosixPath {
590-
assert!(!f.iter().all(posix::is_sep));
590+
assert!(! f.iter().all(windows::is_sep));
591591
self.dir_path().push(f)
592592
}
593593

@@ -648,7 +648,7 @@ impl GenericPath for PosixPath {
648648
fn push_many<S: Str>(&self, cs: &[S]) -> PosixPath {
649649
let mut v = self.components.clone();
650650
for cs.iter().advance |e| {
651-
for e.as_slice().split_iter(posix::is_sep).advance |s| {
651+
for e.as_slice().split_iter(windows::is_sep).advance |s| {
652652
if !s.is_empty() {
653653
v.push(s.to_owned())
654654
}
@@ -662,7 +662,7 @@ impl GenericPath for PosixPath {
662662

663663
fn push(&self, s: &str) -> PosixPath {
664664
let mut v = self.components.clone();
665-
for s.split_iter(posix::is_sep).advance |s| {
665+
for s.split_iter(windows::is_sep).advance |s| {
666666
if !s.is_empty() {
667667
v.push(s.to_owned())
668668
}
@@ -1001,17 +1001,7 @@ pub fn normalize(components: &[~str]) -> ~[~str] {
10011001
cs
10021002
}
10031003

1004-
// Various posix helpers.
1005-
pub mod posix {
1006-
1007-
#[inline]
1008-
pub fn is_sep(u: char) -> bool {
1009-
u == '/'
1010-
}
1011-
1012-
}
1013-
1014-
// Various windows helpers.
1004+
// Various windows helpers, and tests for the impl.
10151005
pub mod windows {
10161006
use libc;
10171007
use option::{None, Option, Some};
@@ -1149,14 +1139,6 @@ mod tests {
11491139

11501140
}
11511141

1152-
#[test]
1153-
fn test_posix_push_with_backslash() {
1154-
let a = PosixPath("/aaa/bbb");
1155-
let b = a.push("x\\y"); // \ is not a file separator for posix paths
1156-
assert_eq!(a.components.len(), 2);
1157-
assert_eq!(b.components.len(), 3);
1158-
}
1159-
11601142
#[test]
11611143
fn test_normalize() {
11621144
fn t(wp: &PosixPath, s: &str) {

0 commit comments

Comments
 (0)