Skip to content

Commit dd985b6

Browse files
committed
---
yaml --- r: 64901 b: refs/heads/snap-stage3 c: c725926 h: refs/heads/master i: 64899: 7c9ccfb v: v3
1 parent 469f196 commit dd985b6

File tree

4 files changed

+23
-60
lines changed

4 files changed

+23
-60
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: 02f7f72a9af16607f9c08989fe56d417842a24dd
4+
refs/heads/snap-stage3: c725926cf5964c4510e2c9ee656c24c48451e88c
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ 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"
375374
opt debug 0 "build with extra debug fun"
376375
opt ratchet-bench 0 "ratchet benchmarks"
377376
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
@@ -794,17 +793,10 @@ do
794793
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
795794
# Just use LLVM straight from its build directory to
796795
# avoid 'make install' time
797-
LLVM_INST_DIR=$LLVM_BUILD_DIR/Debug
796+
LLVM_INST_DIR=$LLVM_BUILD_DIR/Debug+Asserts
798797
else
799798
LLVM_DBG_OPTS="--enable-optimized"
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
799+
LLVM_INST_DIR=$LLVM_BUILD_DIR/Release+Asserts
808800
fi
809801
else
810802
msg "not reconfiguring LLVM, external LLVM root"
@@ -844,7 +836,7 @@ do
844836
LLVM_TARGET="--target=$t"
845837

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

849841
case "$CFG_C_COMPILER" in
850842
("ccache clang")

branches/snap-stage3/src/libextra/getopts.rs

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ pub fn optflag(name: &str) -> Opt {
140140
return Opt {name: mkname(name), hasarg: No, occur: Optional};
141141
}
142142

143-
/** Create an option that is optional, does not take an argument,
144-
* and may occur multiple times.
145-
*/
143+
/// Create an option that is optional and does not take an argument
146144
pub fn optflagmulti(name: &str) -> Opt {
147145
return Opt {name: mkname(name), hasarg: No, occur: Multi};
148146
}
@@ -371,14 +369,7 @@ fn opt_vals(mm: &Matches, nm: &str) -> ~[Optval] {
371369
};
372370
}
373371

374-
fn opt_val(mm: &Matches, nm: &str) -> Option<Optval> {
375-
let vals = opt_vals(mm, nm);
376-
if (vals.is_empty()) {
377-
None
378-
} else {
379-
Some(opt_vals(mm, nm)[0].clone())
380-
}
381-
}
372+
fn opt_val(mm: &Matches, nm: &str) -> Optval { opt_vals(mm, nm)[0].clone() }
382373

383374
/// Returns true if an option was matched
384375
pub fn opt_present(mm: &Matches, nm: &str) -> bool {
@@ -409,10 +400,7 @@ pub fn opts_present(mm: &Matches, names: &[~str]) -> bool {
409400
* argument
410401
*/
411402
pub fn opt_str(mm: &Matches, nm: &str) -> ~str {
412-
return match opt_val(mm, nm) {
413-
Some(Val(s)) => s,
414-
_ => fail!()
415-
};
403+
return match opt_val(mm, nm) { Val(s) => s, _ => fail!() };
416404
}
417405

418406
/**
@@ -424,7 +412,7 @@ pub fn opt_str(mm: &Matches, nm: &str) -> ~str {
424412
pub fn opts_str(mm: &Matches, names: &[~str]) -> ~str {
425413
for names.iter().advance |nm| {
426414
match opt_val(mm, *nm) {
427-
Some(Val(ref s)) => return (*s).clone(),
415+
Val(ref s) => return (*s).clone(),
428416
_ => ()
429417
}
430418
}
@@ -1330,41 +1318,24 @@ mod tests {
13301318
13311319
#[test]
13321320
fn test_multi() {
1321+
let args = ~[~"-e", ~"foo", ~"--encrypt", ~"foo"];
13331322
let opts = ~[optopt("e"), optopt("encrypt"), optopt("f")];
1334-
1335-
let args_single = ~[~"-e", ~"foo"];
1336-
let matches_single = &match getopts(args_single, opts) {
1337-
result::Ok(m) => m,
1338-
result::Err(_) => fail!()
1339-
};
1340-
assert!(opts_present(matches_single, [~"e"]));
1341-
assert!(opts_present(matches_single, [~"encrypt", ~"e"]));
1342-
assert!(opts_present(matches_single, [~"e", ~"encrypt"]));
1343-
assert!(!opts_present(matches_single, [~"encrypt"]));
1344-
assert!(!opts_present(matches_single, [~"thing"]));
1345-
assert!(!opts_present(matches_single, []));
1346-
1347-
assert_eq!(opts_str(matches_single, [~"e"]), ~"foo");
1348-
assert_eq!(opts_str(matches_single, [~"e", ~"encrypt"]), ~"foo");
1349-
assert_eq!(opts_str(matches_single, [~"encrypt", ~"e"]), ~"foo");
1350-
1351-
let args_both = ~[~"-e", ~"foo", ~"--encrypt", ~"foo"];
1352-
let matches_both = &match getopts(args_both, opts) {
1323+
let matches = &match getopts(args, opts) {
13531324
result::Ok(m) => m,
13541325
result::Err(_) => fail!()
13551326
};
1356-
assert!(opts_present(matches_both, [~"e"]));
1357-
assert!(opts_present(matches_both, [~"encrypt"]));
1358-
assert!(opts_present(matches_both, [~"encrypt", ~"e"]));
1359-
assert!(opts_present(matches_both, [~"e", ~"encrypt"]));
1360-
assert!(!opts_present(matches_both, [~"f"]));
1361-
assert!(!opts_present(matches_both, [~"thing"]));
1362-
assert!(!opts_present(matches_both, []));
1363-
1364-
assert_eq!(opts_str(matches_both, [~"e"]), ~"foo");
1365-
assert_eq!(opts_str(matches_both, [~"encrypt"]), ~"foo");
1366-
assert_eq!(opts_str(matches_both, [~"e", ~"encrypt"]), ~"foo");
1367-
assert_eq!(opts_str(matches_both, [~"encrypt", ~"e"]), ~"foo");
1327+
assert!(opts_present(matches, [~"e"]));
1328+
assert!(opts_present(matches, [~"encrypt"]));
1329+
assert!(opts_present(matches, [~"encrypt", ~"e"]));
1330+
assert!(opts_present(matches, [~"e", ~"encrypt"]));
1331+
assert!(!opts_present(matches, [~"f"]));
1332+
assert!(!opts_present(matches, [~"thing"]));
1333+
assert!(!opts_present(matches, []));
1334+
1335+
assert_eq!(opts_str(matches, [~"e"]), ~"foo");
1336+
assert_eq!(opts_str(matches, [~"encrypt"]), ~"foo");
1337+
assert_eq!(opts_str(matches, [~"e", ~"encrypt"]), ~"foo");
1338+
assert_eq!(opts_str(matches, [~"encrypt", ~"e"]), ~"foo");
13681339
}
13691340
13701341
#[test]

branches/snap-stage3/src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ pub fn std_macros() -> @str {
529529
($cond:expr) => {
530530
if !$cond {
531531
::std::sys::FailWithCause::fail_with(
532-
~\"assertion failed: \" + stringify!($cond), file!(), line!())
532+
\"assertion failed: \" + stringify!($cond), file!(), line!())
533533
}
534534
};
535535
($cond:expr, $msg:expr) => {

0 commit comments

Comments
 (0)