Skip to content

Commit e3e3b6f

Browse files
committed
---
yaml --- r: 157503 b: refs/heads/snap-stage3 c: 941d90d h: refs/heads/master i: 157501: 386a744 157499: b1b5c92 157495: e27489b 157487: 8d45082 157471: f36546d 157439: f3eba8f v: v3
1 parent c047dac commit e3e3b6f

File tree

144 files changed

+2167
-3201
lines changed

Some content is hidden

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

144 files changed

+2167
-3201
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: 065caf34f5ff29e04605f95d9c5d511af219439a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6f65ad1a44a022097a55014becba53c86d64cfb8
4+
refs/heads/snap-stage3: 941d90d97f8ab8658fca613c0ff79cde8ddf8fb5
55
refs/heads/try: 0ee4d8b0b112c608646fa75463ab4dc59132efd9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 39 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -151,22 +151,11 @@ validate_opt () {
151151
done
152152
}
153153

154-
# `valopt OPTION_NAME DEFAULT DOC` extracts a string-valued option
155-
# from command line, using provided default value for the option if
156-
# not present, and saves it to the generated config.mk.
157-
#
158-
# `valopt_nosave` is much the same, except that it does not save the
159-
# result to config.mk (instead the script should use `putvar` itself
160-
# later on to save it). `valopt_core` is the core upon which the
161-
# other two are built.
162-
163-
valopt_core() {
164-
VAL_OPTIONS="$VAL_OPTIONS $2"
154+
valopt() {
155+
VAL_OPTIONS="$VAL_OPTIONS $1"
165156

166-
local SAVE=$1
167-
local OP=$2
168-
local DEFAULT=$3
169-
shift
157+
local OP=$1
158+
local DEFAULT=$2
170159
shift
171160
shift
172161
local DOC="$*"
@@ -183,10 +172,7 @@ valopt_core() {
183172
eval $V=$val
184173
fi
185174
done
186-
if [ "$SAVE" = "save" ]
187-
then
188-
putvar $V
189-
fi
175+
putvar $V
190176
else
191177
if [ -z "$DEFAULT" ]
192178
then
@@ -197,30 +183,11 @@ valopt_core() {
197183
fi
198184
}
199185

200-
valopt_nosave() {
201-
valopt_core nosave "$@"
202-
}
203-
204-
valopt() {
205-
valopt_core save "$@"
206-
}
207-
208-
# `opt OPTION_NAME DEFAULT DOC` extracts a boolean-valued option from
209-
# command line, using the provided default value (0/1) for the option
210-
# if not present, and saves it to the generated config.mk.
211-
#
212-
# `opt_nosave` is much the same, except that it does not save the
213-
# result to config.mk (instead the script should use `putvar` itself
214-
# later on to save it). `opt_core` is the core upon which the other
215-
# two are built.
216-
217-
opt_core() {
218-
BOOL_OPTIONS="$BOOL_OPTIONS $2"
186+
opt() {
187+
BOOL_OPTIONS="$BOOL_OPTIONS $1"
219188

220-
local SAVE=$1
221-
local OP=$2
222-
local DEFAULT=$3
223-
shift
189+
local OP=$1
190+
local DEFAULT=$2
224191
shift
225192
shift
226193
local DOC="$*"
@@ -244,10 +211,7 @@ opt_core() {
244211
FLAG=$(echo $FLAG | tr 'a-z' 'A-Z')
245212
local V="CFG_${FLAG}_${OP}"
246213
eval $V=1
247-
if [ "$SAVE" = "save" ]
248-
then
249-
putvar $V
250-
fi
214+
putvar $V
251215
fi
252216
done
253217
else
@@ -259,14 +223,6 @@ opt_core() {
259223
fi
260224
}
261225

262-
opt_nosave() {
263-
opt_core nosave "$@"
264-
}
265-
266-
opt() {
267-
opt_core save "$@"
268-
}
269-
270226
envopt() {
271227
local NAME=$1
272228
local V="CFG_${NAME}"
@@ -466,40 +422,38 @@ opt llvm-assertions 1 "build LLVM with assertions"
466422
opt debug 1 "build with extra debug fun"
467423
opt ratchet-bench 0 "ratchet benchmarks"
468424
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
425+
opt manage-submodules 1 "let the build manage the git submodules"
469426
opt mingw-cross 0 "cross-compile for win32 using mingw"
427+
opt clang 0 "prefer clang to gcc for building the runtime"
470428
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
471429
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
430+
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
472431
opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
473432
opt rpath 0 "build rpaths into rustc itself"
474433
opt nightly 0 "build nightly packages"
475434
opt verify-install 1 "verify installed binaries work"
435+
opt jemalloc 1 "build liballoc with jemalloc"
476436
# This is used by the automation to produce single-target nightlies
477437
opt dist-host-only 0 "only install bins for the host architecture"
478-
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
479-
opt jemalloc 1 "build liballoc with jemalloc"
438+
valopt prefix "/usr/local" "set installation prefix"
439+
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
440+
valopt llvm-root "" "set LLVM root"
441+
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
442+
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
443+
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
444+
445+
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
446+
valopt host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
447+
valopt target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
480448

481449
valopt localstatedir "/var/lib" "local state directory"
482450
valopt sysconfdir "/etc" "install system configuration files"
483451

484452
valopt datadir "${CFG_PREFIX}/share" "install data"
485453
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
486-
valopt llvm-root "" "set LLVM root"
487-
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
488-
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
489-
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
490-
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
491-
492-
# Many of these are saved below during the "writing configuration" step
493-
# (others are conditionally saved).
494-
opt_nosave manage-submodules 1 "let the build manage the git submodules"
495-
opt_nosave clang 0 "prefer clang to gcc for building the runtime"
454+
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
496455

497-
valopt_nosave prefix "/usr/local" "set installation prefix"
498-
valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
499-
valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
500-
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
501-
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
502-
valopt_nosave release-channel "dev" "the name of the release channel to build"
456+
valopt release-channel "dev" "the name of the release channel to build"
503457

504458
# On windows we just store the libraries in the bin directory because
505459
# there's no rpath. This is where the build system itself puts libraries;
@@ -537,8 +491,8 @@ esac
537491
if [ ! -z "$CFG_ENABLE_NIGHTLY" ]
538492
then
539493
CFG_RELEASE_CHANNEL=nightly
494+
putvar CFG_RELEASE_CHANNEL
540495
fi
541-
putvar CFG_RELEASE_CHANNEL
542496

543497
step_msg "looking for build programs"
544498

@@ -651,27 +605,17 @@ then
651605
err "no local rust to use"
652606
fi
653607

654-
CMD="${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF}"
655-
LRV=`$CMD --version`
656-
if [ $? -ne 0 ]
657-
then
658-
step_msg "failure while running $CMD --version"
659-
exit 1
660-
fi
608+
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} --version`
661609
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
662610
putvar CFG_LOCAL_RUST_ROOT
663-
else
664-
if [ ! -z "$CFG_LOCAL_RUST_ROOT" ]
665-
then
666-
warn "Use of --local-rust-root without --enable-local-rust"
667-
fi
668611
fi
669612

670613
# Force freebsd to build with clang; gcc doesn't like us there
671614
if [ $CFG_OSTYPE = unknown-freebsd ]
672615
then
673616
step_msg "on FreeBSD, forcing use of clang"
674617
CFG_ENABLE_CLANG=1
618+
putvar CFG_ENABLE_CLANG
675619
fi
676620

677621
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
@@ -688,10 +632,12 @@ then
688632
then
689633
step_msg "on OS X 10.9, forcing use of clang"
690634
CFG_ENABLE_CLANG=1
635+
putvar CFG_ENABLE_CLANG
691636
else
692637
if [ $("$CFG_GCC" --version 2>&1 | grep -c ' 4\.[0-6]') -ne 0 ]; then
693638
step_msg "older GCC found, using clang instead"
694639
CFG_ENABLE_CLANG=1
640+
putvar CFG_ENABLE_CLANG
695641
else
696642
# on OS X, with xcode 5 and newer, certain developers may have
697643
# cc, gcc and g++ point to a mixture of clang and gcc
@@ -717,13 +663,6 @@ then
717663
fi
718664
fi
719665

720-
# Okay, at this point, we have made up our minds about whether we are
721-
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
722-
if [ ! -z "$CFG_ENABLE_CLANG" ]
723-
then
724-
putvar CFG_ENABLE_CLANG
725-
fi
726-
727666
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
728667
then
729668
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
@@ -989,7 +928,6 @@ do
989928
make_dir $h/test/doc-guide-container
990929
make_dir $h/test/doc-guide-tasks
991930
make_dir $h/test/doc-guide-plugin
992-
make_dir $h/test/doc-guide-crates
993931
make_dir $h/test/doc-rust
994932
done
995933

@@ -1265,11 +1203,18 @@ putvar CFG_OSTYPE
12651203
putvar CFG_CPUTYPE
12661204
putvar CFG_CONFIGURE_ARGS
12671205
putvar CFG_PREFIX
1206+
putvar CFG_BUILD
12681207
putvar CFG_HOST
12691208
putvar CFG_TARGET
1209+
putvar CFG_LIBDIR
12701210
putvar CFG_LIBDIR_RELATIVE
12711211
putvar CFG_DISABLE_MANAGE_SUBMODULES
1212+
putvar CFG_ANDROID_CROSS_PATH
1213+
putvar CFG_MINGW32_CROSS_PATH
12721214
putvar CFG_MANDIR
1215+
putvar CFG_DISABLE_INJECT_STD_VERSION
1216+
putvar CFG_JEMALLOC_ROOT
1217+
putvar CFG_DISABLE_JEMALLOC
12731218

12741219
# Avoid spurious warnings from clang by feeding it original source on
12751220
# ccache-miss rather than preprocessed input.
@@ -1292,6 +1237,7 @@ then
12921237
putvar CFG_PANDOC
12931238
fi
12941239

1240+
putvar CFG_LLVM_ROOT
12951241
putvar CFG_LLVM_SRC_DIR
12961242

12971243
for t in $CFG_HOST

branches/snap-stage3/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
######################################################################
2828
DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
2929
guide-tasks guide-container guide-pointers guide-testing \
30-
guide-plugin guide-crates complement-bugreport \
30+
guide-plugin complement-bugreport \
3131
complement-lang-faq complement-design-faq complement-project-faq rust \
3232
rustdoc guide-unsafe guide-strings reference
3333

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::io::fs;
2525
use std::from_str::FromStr;
2626
use getopts::{optopt, optflag, reqopt};
2727
use common::Config;
28-
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
28+
use common::{Pretty, DebugInfoGdb, Codegen};
2929
use util::logv;
3030
use regex::Regex;
3131

@@ -244,16 +244,6 @@ pub fn run_tests(config: &Config) {
244244
os::setenv("RUST_TEST_TASKS","1");
245245
}
246246

247-
match config.mode {
248-
DebugInfoLldb => {
249-
// Some older versions of LLDB seem to have problems with multiple
250-
// instances running in parallel, so only run one test task at a
251-
// time.
252-
os::setenv("RUST_TEST_TASKS", "1");
253-
}
254-
_ => { /* proceed */ }
255-
}
256-
257247
let opts = test_opts(config);
258248
let tests = make_tests(config);
259249
// sadly osx needs some file descriptor limits raised for running tests in

branches/snap-stage3/src/doc/guide-crates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ fn main() {
452452
453453
Rust will give us a compile-time error:
454454
455-
```{notrust,ignore}
455+
```{rust,ignore}
456456
Compiling phrases v0.0.1 (file:///home/you/projects/phrases)
457457
/home/you/projects/phrases/src/main.rs:4:5: 4:40 error: a value named `hello` has already been imported in this module
458458
/home/you/projects/phrases/src/main.rs:4 use phrases::japanese::greetings::hello;

branches/snap-stage3/src/doc/guide-plugin.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern crate rustc;
5656
5757
use syntax::codemap::Span;
5858
use syntax::parse::token::{IDENT, get_ident};
59-
use syntax::ast::{TokenTree, TtToken};
59+
use syntax::ast::{TokenTree, TTTok};
6060
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacExpr};
6161
use syntax::ext::build::AstBuilder; // trait for expr_uint
6262
use rustc::plugin::Registry;
@@ -71,7 +71,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
7171
("I", 1)];
7272
7373
let text = match args {
74-
[TtToken(_, IDENT(s, _))] => get_ident(s).to_string(),
74+
[TTTok(_, IDENT(s, _))] => get_ident(s).to_string(),
7575
_ => {
7676
cx.span_err(sp, "argument should be a single identifier");
7777
return DummyResult::any(sp);

branches/snap-stage3/src/doc/guide-strings.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Rust has two main types of strings: `&str` and `String`.
1414

1515
# &str
1616

17-
The first kind is a `&str`. This is pronounced a 'string slice'.
18-
String literals are of the type `&str`:
17+
The first kind is a `&str`. This is pronounced a 'string slice.' String literals
18+
are of the type `&str`:
1919

2020
```{rust}
2121
let string = "Hello there.";
@@ -121,8 +121,8 @@ Both of these lines will print `12`.
121121
To compare a String to a constant string, prefer `as_slice()`...
122122

123123
```{rust}
124-
fn compare(x: String) {
125-
if x.as_slice() == "Hello" {
124+
fn compare(string: String) {
125+
if string.as_slice() == "Hello" {
126126
println!("yes");
127127
}
128128
}
@@ -131,8 +131,8 @@ fn compare(x: String) {
131131
... over `to_string()`:
132132

133133
```{rust}
134-
fn compare(x: String) {
135-
if x == "Hello".to_string() {
134+
fn compare(string: String) {
135+
if string == "Hello".to_string() {
136136
println!("yes");
137137
}
138138
}

0 commit comments

Comments
 (0)