Skip to content

Commit 1e967df

Browse files
committed
---
yaml --- r: 181067 b: refs/heads/master c: 5cbdf1d h: refs/heads/master i: 181065: d7779ab 181063: 7251456 v: v3
1 parent 1481195 commit 1e967df

File tree

578 files changed

+7882
-21980
lines changed

Some content is hidden

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

578 files changed

+7882
-21980
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f9aeea7cb7865a2b82e7102837daabbe549177ea
2+
refs/heads/master: 5cbdf1db9bde6ffb8da4327974c2f5bb105c108a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f1bb6c2f46f08c1d7b6d695f5b3cf93142cb8860
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ documentation.
55

66
## Quick Start
77

8-
Read ["Installing Rust"][install] from [The Book][trpl].
8+
1. Download a [binary installer][installer] for your platform.
9+
2. Read [The Rust Programming Language][trpl].
10+
3. Enjoy!
911

10-
[install]: http://doc.rust-lang.org/book/installing-rust.html
12+
> ***Note:*** Windows users can read the detailed
13+
> [using Rust on Windows][win-wiki] notes on the wiki.
14+
15+
[installer]: http://www.rust-lang.org/install.html
1116
[trpl]: http://doc.rust-lang.org/book/index.html
17+
[win-wiki]: https://github.com/rust-lang/rust/wiki/Using-Rust-on-Windows
1218

1319
## Building from Source
1420

@@ -46,6 +52,8 @@ Read ["Installing Rust"][install] from [The Book][trpl].
4652
When complete, `make install` will place several programs into
4753
`/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
4854
API-documentation tool.
55+
3. Read [The Rust Programming Language][trpl].
56+
4. Enjoy!
4957

5058
### Building on Windows
5159

@@ -73,6 +81,7 @@ $ pacman -S base-devel
7381

7482
[repo]: https://github.com/rust-lang/rust
7583
[tarball]: https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz
84+
[trpl]: http://doc.rust-lang.org/book/index.html
7685

7786
## Notes
7887

trunk/configure

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ opt verify-install 1 "verify installed binaries work"
525525
opt dist-host-only 0 "only install bins for the host architecture"
526526
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
527527
opt jemalloc 1 "build liballoc with jemalloc"
528-
opt llvm-version-check 1 "don't check if the LLVM version is supported, build anyway"
529528

530529
valopt localstatedir "/var/lib" "local state directory"
531530
valopt sysconfdir "/etc" "install system configuration files"
@@ -797,7 +796,7 @@ then
797796
putvar CFG_ENABLE_CLANG
798797
fi
799798

800-
if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
799+
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
801800
then
802801
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
803802

@@ -1379,8 +1378,7 @@ do
13791378
done
13801379

13811380
# Munge any paths that appear in config.mk back to posix-y
1382-
cp config.tmp config.tmp.bak
1383-
sed -e 's@ \([a-zA-Z]\):[/\\]@ /\1/@g;' <config.tmp.bak >config.tmp
1381+
sed -i.bak -e 's@ \([a-zA-Z]\):[/\\]@ /\1/@g;' config.tmp
13841382
rm -f config.tmp.bak
13851383

13861384
msg

trunk/mk/dist.mk

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ distcheck-tar-src: dist-tar-src
109109
# Unix binary installer tarballs
110110
######################################################################
111111

112+
NON_INSTALLED_PREFIXES=COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md,version
113+
112114
define DEF_INSTALLER
113115

114116
$$(eval $$(call DEF_PREPARE,dir-$(1)))
@@ -122,23 +124,19 @@ dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
122124
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
123125
dist-install-dir-$(1): PREPARE_CLEAN=true
124126
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
127+
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)
128+
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
129+
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
130+
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
125131
$$(Q)mkdir -p $$(PREPARE_DEST_DIR)/share/doc/rust
126132
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)/share/doc/rust
127133
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)/share/doc/rust
128134
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)/share/doc/rust
129135
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)/share/doc/rust
130-
131-
prepare-overlay-$(1):
132-
$$(Q)rm -Rf tmp/dist/$$(PKG_NAME)-$(1)-overlay
133-
$$(Q)mkdir -p tmp/dist/$$(PKG_NAME)-$(1)-overlay
134-
$$(Q)cp $$(S)COPYRIGHT tmp/dist/$$(PKG_NAME)-$(1)-overlay/
135-
$$(Q)cp $$(S)LICENSE-APACHE tmp/dist/$$(PKG_NAME)-$(1)-overlay/
136-
$$(Q)cp $$(S)LICENSE-MIT tmp/dist/$$(PKG_NAME)-$(1)-overlay/
137-
$$(Q)cp $$(S)README.md tmp/dist/$$(PKG_NAME)-$(1)-overlay/
138136
# This tiny morsel of metadata is used by rust-packaging
139-
$$(Q)echo "$(CFG_VERSION)" > tmp/dist/$$(PKG_NAME)-$(1)-overlay/version
137+
$$(Q)echo "$(CFG_VERSION)" > $$(PREPARE_DEST_DIR)/version
140138

141-
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1) prepare-overlay-$(1)
139+
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
142140
@$(call E, build: $$@)
143141
# Copy essential gcc components into installer
144142
ifdef CFG_WINDOWSY_$(1)
@@ -148,12 +146,13 @@ ifdef CFG_WINDOWSY_$(1)
148146
endif
149147
$$(Q)$$(S)src/rust-installer/gen-installer.sh \
150148
--product-name=Rust \
149+
--verify-bin=rustc \
151150
--rel-manifest-dir=rustlib \
152151
--success-message=Rust-is-ready-to-roll. \
153152
--image-dir=tmp/dist/$$(PKG_NAME)-$(1)-image \
154153
--work-dir=tmp/dist \
155154
--output-dir=dist \
156-
--non-installed-overlay=tmp/dist/$$(PKG_NAME)-$(1)-overlay \
155+
--non-installed-prefixes=$$(NON_INSTALLED_PREFIXES) \
157156
--package-name=$$(PKG_NAME)-$(1) \
158157
--component-name=rustc \
159158
--legacy-manifest-dirs=rustlib,cargo

trunk/mk/docs.mk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
######################################################################
2828
DOCS := index intro tutorial complement-bugreport \
2929
complement-lang-faq complement-design-faq complement-project-faq \
30-
rustdoc reference grammar
30+
rustdoc reference
3131

3232
# Legacy guides, preserved for a while to reduce the number of 404s
3333
DOCS += guide-crates guide-error-handling guide-ffi guide-macros guide \
@@ -87,7 +87,7 @@ endif
8787

8888
# Check for xelatex
8989

90-
ifneq ($(CFG_XELATEX),)
90+
ifeq ($(CFG_XELATEX),)
9191
CFG_LATEX := $(CFG_XELATEX)
9292
XELATEX = 1
9393
else
@@ -129,21 +129,21 @@ doc/:
129129
HTML_DEPS += doc/rust.css
130130
doc/rust.css: $(D)/rust.css | doc/
131131
@$(call E, cp: $@)
132-
$(Q)cp -PRp $< $@ 2> /dev/null
132+
$(Q)cp -a $< $@ 2> /dev/null
133133

134134
HTML_DEPS += doc/favicon.inc
135135
doc/favicon.inc: $(D)/favicon.inc | doc/
136136
@$(call E, cp: $@)
137-
$(Q)cp -PRp $< $@ 2> /dev/null
137+
$(Q)cp -a $< $@ 2> /dev/null
138138

139139
doc/full-toc.inc: $(D)/full-toc.inc | doc/
140140
@$(call E, cp: $@)
141-
$(Q)cp -PRp $< $@ 2> /dev/null
141+
$(Q)cp -a $< $@ 2> /dev/null
142142

143143
HTML_DEPS += doc/footer.inc
144144
doc/footer.inc: $(D)/footer.inc | doc/
145145
@$(call E, cp: $@)
146-
$(Q)cp -PRp $< $@ 2> /dev/null
146+
$(Q)cp -a $< $@ 2> /dev/null
147147

148148
# The (english) documentation for each doc item.
149149

trunk/mk/install.mk

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ CFG_ADB_DEVICE_STATUS=$(1)
6565
endef
6666

6767
$(foreach target,$(CFG_TARGET), \
68-
$(if $(findstring $(target),"arm-linux-androideabi"), \
68+
$(if $(or $(findstring $(target),"arm-linux-androideabi"),$(findstring $(target),"aarch64-linux-android")), \
6969
$(if $(findstring adb,$(CFG_ADB)), \
7070
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
7171
$(info install: install-runtime-target for $(target) enabled \
@@ -117,8 +117,11 @@ install-runtime-target-$(1)-cleanup:
117117
$$(call ADB_SHELL,rm,$$(CFG_RUNTIME_PUSH_DIR)/$$(call CFG_LIB_GLOB_$(1),$$(crate)));)
118118
endef
119119

120-
$(eval $(call INSTALL_RUNTIME_TARGET_N,arm-linux-androideabi,$(CFG_BUILD)))
121-
$(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,arm-linux-androideabi))
120+
$(foreach target,$(CFG_TARGET), \
121+
$(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \
122+
$(eval $(call INSTALL_RUNTIME_TARGET_N,$(taget),$(CFG_BUILD))) \
123+
$(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,arm-linux-$(target))) \
124+
))
122125

123126
install-runtime-target: \
124127
install-runtime-target-arm-linux-androideabi-cleanup \

trunk/mk/main.mk

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.0.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=.2
21+
CFG_PRERELEASE_VERSION=.1
2222

2323
CFG_FILENAME_EXTRA=4e7c5e5c
2424

@@ -30,8 +30,8 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
3030
CFG_DISABLE_UNSTABLE_FEATURES=1
3131
endif
3232
ifeq ($(CFG_RELEASE_CHANNEL),beta)
33-
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
34-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
33+
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta$(CFG_PRERELEASE_VERSION)
34+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-beta$(CFG_PRERELEASE_VERSION)
3535
CFG_DISABLE_UNSTABLE_FEATURES=1
3636
endif
3737
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
@@ -61,16 +61,13 @@ SPACE :=
6161
SPACE +=
6262
ifneq ($(CFG_GIT),)
6363
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
64-
CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --date=short --pretty=format:'%cd')
64+
CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --pretty=format:'%ci')
6565
CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD)
6666
CFG_SHORT_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse --short=9 HEAD)
6767
CFG_VERSION += ($(CFG_SHORT_VER_HASH) $(CFG_VER_DATE))
6868
endif
6969
endif
7070

71-
CFG_BUILD_DATE = $(shell date +%F)
72-
CFG_VERSION += (built $(CFG_BUILD_DATE))
73-
7471
# Windows exe's need numeric versions - don't use anything but
7572
# numbers and dots here
7673
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
@@ -320,7 +317,6 @@ endif
320317
ifdef CFG_VER_HASH
321318
export CFG_VER_HASH
322319
endif
323-
export CFG_BUILD_DATE
324320
export CFG_VERSION
325321
export CFG_VERSION_WIN
326322
export CFG_RELEASE

trunk/mk/tests.mk

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ ifdef CHECK_IGNORED
3838
TESTARGS += --ignored
3939
endif
4040

41+
4142
# Arguments to the cfail/rfail/rpass/bench tests
4243
ifdef CFG_VALGRIND
4344
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
4445
endif
4546

47+
ifdef PLEASE_BENCH
48+
TESTARGS += --bench
49+
endif
50+
4651
# Arguments to the perf tests
4752
ifdef CFG_PERF_TOOL
4853
CTEST_PERF_RUNTOOL = --runtool "$(CFG_PERF_TOOL)"
4954
endif
5055

5156
CTEST_TESTARGS := $(TESTARGS)
5257

53-
# --bench is only relevant for crate tests, not for the compile tests
54-
ifdef PLEASE_BENCH
55-
TESTARGS += --bench
56-
endif
57-
5858
ifdef VERBOSE
5959
CTEST_TESTARGS += --verbose
6060
endif
@@ -111,14 +111,15 @@ $(foreach target,$(CFG_TARGET), \
111111
# for arm-linux-androidabi
112112
define DEF_ADB_DEVICE_STATUS
113113
CFG_ADB_DEVICE_STATUS=$(1)
114+
CFG_ANDROID_TARGET_TRIPLE=$(2)
114115
endef
115116

116117
$(foreach target,$(CFG_TARGET), \
117-
$(if $(findstring $(target),"arm-linux-androideabi"), \
118+
$(if $(or $(findstring $(target),"arm-linux-androideabi"),$(findstring $(target),"aarch64-linux-android")), \
118119
$(if $(findstring adb,$(CFG_ADB)), \
119120
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[:_A-Za-z0-9-]+[[:blank:]]+device')), \
120121
$(info check: android device attached) \
121-
$(eval $(call DEF_ADB_DEVICE_STATUS, true)), \
122+
$(eval $(call DEF_ADB_DEVICE_STATUS, true, $(target))), \
122123
$(info check: android device not attached) \
123124
$(eval $(call DEF_ADB_DEVICE_STATUS, false)) \
124125
), \
@@ -138,7 +139,7 @@ $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
138139
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)/tmp) \
139140
$(shell $(CFG_ADB) push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \
140141
$(foreach crate,$(TARGET_CRATES), \
141-
$(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_arm-linux-androideabi,$(crate)) \
142+
$(shell $(CFG_ADB) push $(TLIB2_T_$(CFG_ANDROID_TARGET_TRIPLE)_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_$(CFG_ANDROID_TARGET_TRIPLE),$(crate)) \
142143
$(CFG_ADB_TEST_DIR))) \
143144
)
144145
else
@@ -393,7 +394,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
393394
&& touch $$@
394395
endef
395396

396-
define DEF_TEST_CRATE_RULES_arm-linux-androideabi
397+
define DEF_TEST_CRATE_RULES_android
397398
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
398399

399400
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
@@ -434,9 +435,9 @@ $(foreach host,$(CFG_HOST), \
434435
$(foreach crate, $(TEST_CRATES), \
435436
$(if $(findstring $(target),$(CFG_BUILD)), \
436437
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))), \
437-
$(if $(findstring $(target),"arm-linux-androideabi"), \
438+
$(if $(or $(findstring $(target),"arm-linux-androideabi"), $(findstring $(target),"aarch64-linux-android")), \
438439
$(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \
439-
$(eval $(call DEF_TEST_CRATE_RULES_arm-linux-androideabi,$(stage),$(target),$(host),$(crate))), \
440+
$(eval $(call DEF_TEST_CRATE_RULES_android,$(stage),$(target),$(host),$(crate))), \
440441
$(eval $(call DEF_TEST_CRATE_RULES_null,$(stage),$(target),$(host),$(crate))) \
441442
), \
442443
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))) \

trunk/src/compiletest/compiletest.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15+
#![feature(core)]
1516
#![feature(int_uint)]
1617
#![feature(io)]
18+
#![feature(os)]
1719
#![feature(path)]
1820
#![feature(rustc_private)]
19-
#![feature(unboxed_closures)]
21+
#![feature(slicing_syntax, unboxed_closures)]
2022
#![feature(std_misc)]
2123
#![feature(test)]
2224
#![feature(unicode)]
@@ -47,7 +49,8 @@ pub mod common;
4749
pub mod errors;
4850

4951
pub fn main() {
50-
let config = parse_config(env::args().collect());
52+
let args = env::args().map(|s| s.into_string().unwrap()).collect();;
53+
let config = parse_config(args);
5154

5255
if config.valgrind_path.is_none() && config.force_valgrind {
5356
panic!("Can't find Valgrind to run Valgrind tests");
@@ -155,10 +158,8 @@ pub fn parse_config(args: Vec<String> ) -> Config {
155158
adb_path: opt_str2(matches.opt_str("adb-path")),
156159
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),
157160
adb_device_status:
158-
"arm-linux-androideabi" ==
159-
opt_str2(matches.opt_str("target")) &&
160-
"(none)" !=
161-
opt_str2(matches.opt_str("adb-test-dir")) &&
161+
opt_str2(matches.opt_str("target")).contains("android") &&
162+
"(none)" != opt_str2(matches.opt_str("adb-test-dir")) &&
162163
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
163164
lldb_python_dir: matches.opt_str("lldb-python-dir"),
164165
verbose: matches.opt_present("verbose"),
@@ -213,17 +214,17 @@ pub fn opt_str2(maybestr: Option<String>) -> String {
213214
}
214215

215216
pub fn run_tests(config: &Config) {
216-
if config.target == "arm-linux-androideabi" {
217+
if config.target.contains("android") {
217218
match config.mode {
218219
DebugInfoGdb => {
219-
println!("arm-linux-androideabi debug-info \
220-
test uses tcp 5039 port. please reserve it");
220+
println!("{} debug-info test uses tcp 5039 port.\
221+
please reserve it", config.target);
221222
}
222223
_ =>{}
223224
}
224225

225-
//arm-linux-androideabi debug-info test uses remote debugger
226-
//so, we test 1 task at once.
226+
// android debug-info test uses remote debugger
227+
// so, we test 1 task at once.
227228
// also trying to isolate problems with adb_run_wrapper.sh ilooping
228229
env::set_var("RUST_TEST_TASKS","1");
229230
}

0 commit comments

Comments
 (0)