Skip to content

Commit 38ca013

Browse files
author
Ulrik Sverdrup
committed
---
yaml --- r: 211419 b: refs/heads/tmp c: 5249cbb h: refs/heads/master i: 211417: 0d63e6b 211415: 75ae61c v: v3
1 parent 1340edc commit 38ca013

File tree

321 files changed

+4861
-4423
lines changed

Some content is hidden

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

321 files changed

+4861
-4423
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: 2d00dc3b85aaf81caa3a4e5764c5e185a4dd0a7c
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: 621a10e7f32d790c39a0b4528369cf7959dd7d34
35+
refs/heads/tmp: 5249cbb7fa31ea2e6e8d77b49bfda386215b1ce7
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: 704c2ee730d2e948d11a2edd77e3f35de8329a6e
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/RELEASES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Language
1919

2020
* Several [restrictions have been added to trait coherence][coh] in
2121
order to make it easier for upstream authors to change traits
22-
without breaking downstream code.
22+
without breaking downsteam code.
2323
* Digits of binary and octal literals are [lexed more eagerly][lex] to
2424
improve error messages and macro behavior. For example, `0b1234` is
2525
now lexed as `0b1234` instead of two tokens, `0b1` and `234`.
@@ -169,10 +169,10 @@ Version 1.0.0-alpha.2 (February 2015)
169169
* Highlights
170170

171171
* The various I/O modules were [overhauled][io-rfc] to reduce
172-
unnecessary abstractions and provide better interoperation with
172+
unncessary abstractions and provide better interoperation with
173173
the underlying platform. The old `io` module remains temporarily
174174
at `std::old_io`.
175-
* The standard library now [participates in feature gating][feat],
175+
* The standard library now [partipates in feature gating][feat],
176176
so use of unstable libraries now requires a `#![feature(...)]`
177177
attribute. The impact of this change is [described on the
178178
forum][feat-forum]. [RFC][feat-rfc].
@@ -385,7 +385,7 @@ Version 1.0.0-alpha (January 2015)
385385
syscall when available.
386386
* The 'serialize' crate has been renamed 'rustc-serialize' and
387387
moved out of the distribution to Cargo. Although it is widely
388-
used now, it is expected to be superseded in the near future.
388+
used now, it is expected to be superceded in the near future.
389389
* The `Show` formatter, typically implemented with
390390
`#[derive(Show)]` is [now requested with the `{:?}`
391391
specifier][show] and is intended for use by all types, for uses

branches/tmp/configure

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
msg() {
4-
echo "configure: $*"
4+
echo "configure: $1"
55
}
66

77
step_msg() {
@@ -33,8 +33,8 @@ need_ok() {
3333

3434
need_cmd() {
3535
if command -v $1 >/dev/null 2>&1
36-
then msg "found program '$1'"
37-
else err "program '$1' is missing, please install it"
36+
then msg "found program $1"
37+
else err "need program $1"
3838
fi
3939
}
4040

@@ -717,10 +717,10 @@ probe CFG_MD5 md5
717717
probe CFG_MD5SUM md5sum
718718
if [ -n "$CFG_MD5" ]
719719
then
720-
CFG_HASH_COMMAND="$CFG_MD5 -q | cut -c 1-8"
720+
CFG_HASH_COMMAND="$CFG_MD5 -q | head -c 8"
721721
elif [ -n "$CFG_MD5SUM" ]
722722
then
723-
CFG_HASH_COMMAND="$CFG_MD5SUM | cut -c 1-8"
723+
CFG_HASH_COMMAND="$CFG_MD5SUM | head -c 8"
724724
else
725725
err 'could not find one of: md5 md5sum'
726726
fi
@@ -863,6 +863,11 @@ then
863863
CFG_DISABLE_JEMALLOC=1
864864
fi
865865

866+
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
867+
then
868+
err "either clang or gcc is required"
869+
fi
870+
866871
# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
867872
# system, so if we find that gcc is clang, we should just use clang directly.
868873
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]
@@ -981,7 +986,7 @@ then
981986
| cut -d ' ' -f 2)
982987

983988
case $CFG_CLANG_VERSION in
984-
(3.2* | 3.3* | 3.4* | 3.5* | 3.6* | 3.7*)
989+
(3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
985990
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
986991
if [ -z "$CC" ]
987992
then

branches/tmp/man/rustc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTC "1" "August 2015" "rustc 1.2.0" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.13.0" "User Commands"
22
.SH NAME
33
rustc \- The Rust compiler
44
.SH SYNOPSIS
@@ -160,7 +160,7 @@ If the value is 'help', then a list of available CPUs is printed.
160160
\fBtarget\-feature\fR='\fI+feature1\fR,\fI\-feature2\fR'
161161
A comma\[hy]separated list of features to enable or disable for the target.
162162
A preceding '+' enables a feature while a preceding '\-' disables it.
163-
Available features can be discovered through \fIllc -mcpu=help\fR.
163+
Available features can be discovered through \fItarget\-cpu=help\fR.
164164
.TP
165165
\fBpasses\fR=\fIval\fR
166166
A space\[hy]separated list of extra LLVM passes to run.

branches/tmp/man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTDOC "1" "August 2015" "rustdoc 1.2.0" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.13.0" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

branches/tmp/mk/cfg/aarch64-linux-android.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# aarch64-linux-android configuration
22
# CROSS_PREFIX_aarch64-linux-android-
33
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
4+
LINK_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
45
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
56
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
67
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar

branches/tmp/mk/cfg/aarch64-unknown-linux-gnu.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# aarch64-unknown-linux-gnu configuration
22
CROSS_PREFIX_aarch64-unknown-linux-gnu=aarch64-linux-gnu-
33
CC_aarch64-unknown-linux-gnu=gcc
4+
LINK_aarch64-unknown-linux-gnu=gcc
45
CXX_aarch64-unknown-linux-gnu=g++
56
CPP_aarch64-unknown-linux-gnu=gcc -E
67
AR_aarch64-unknown-linux-gnu=ar

branches/tmp/mk/cfg/arm-linux-androideabi.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# arm-linux-androideabi configuration
2+
LINK_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
23
CC_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
34
CXX_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++
45
CPP_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc -E

branches/tmp/mk/cfg/x86_64-pc-windows-gnu.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# x86_64-pc-windows-gnu configuration
22
CROSS_PREFIX_x86_64-pc-windows-gnu=x86_64-w64-mingw32-
33
CC_x86_64-pc-windows-gnu=gcc
4+
LINK_x86_64-pc-windows-gnu=gcc
45
CXX_x86_64-pc-windows-gnu=g++
56
CPP_x86_64-pc-windows-gnu=gcc -E
67
AR_x86_64-pc-windows-gnu=ar

branches/tmp/mk/dist.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
123123
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
124124
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
125125
dist-install-dir-$(1): PREPARE_CLEAN=true
126-
dist-install-dir-$(1): prepare-base-dir-$(1) docs
126+
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
127127
$$(Q)mkdir -p $$(PREPARE_DEST_DIR)/share/doc/rust
128128
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)/share/doc/rust
129129
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)/share/doc/rust
@@ -163,7 +163,7 @@ endif
163163
--legacy-manifest-dirs=rustlib,cargo
164164
$$(Q)rm -R tmp/dist/$$(PKG_NAME)-$(1)-image
165165

166-
dist-doc-install-dir-$(1): docs
166+
dist-doc-install-dir-$(1): docs compiler-docs
167167
$$(Q)mkdir -p tmp/dist/$$(DOC_PKG_NAME)-$(1)-image/share/doc/rust
168168
$$(Q)cp -r doc tmp/dist/$$(DOC_PKG_NAME)-$(1)-image/share/doc/rust/html
169169

@@ -251,7 +251,7 @@ distcheck-tar-bins: dist-tar-bins
251251

252252
# Just copy the docs to a folder under dist with the appropriate name
253253
# for uploading to S3
254-
dist-docs: docs
254+
dist-docs: docs compiler-docs
255255
$(Q) rm -Rf dist/doc
256256
$(Q) mkdir -p dist/doc/
257257
$(Q) cp -r doc dist/doc/$(CFG_PACKAGE_VERS)

branches/tmp/mk/docs.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
7777

7878
D := $(S)src/doc
7979

80-
# FIXME (#25705) eventually may want to put error-index target back here.
81-
DOC_TARGETS := trpl style
80+
DOC_TARGETS := trpl style error-index
8281
COMPILER_DOC_TARGETS :=
8382
DOC_L10N_TARGETS :=
8483

branches/tmp/mk/platform.mk

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,6 @@ endef
120120
$(foreach target,$(CFG_TARGET), \
121121
$(eval $(call ADD_INSTALLED_OBJECTS,$(target))))
122122

123-
define DEFINE_LINKER
124-
ifndef LINK_$(1)
125-
LINK_$(1) := $$(CC_$(1))
126-
endif
127-
endef
128-
129-
$(foreach target,$(CFG_TARGET), \
130-
$(eval $(call DEFINE_LINKER,$(target))))
131-
132123
# The -Qunused-arguments sidesteps spurious warnings from clang
133124
define FILTER_FLAGS
134125
ifeq ($$(CFG_USING_CLANG),1)

branches/tmp/mk/tests.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,10 @@ ifeq ($(CFG_LLDB),)
581581
CTEST_DISABLE_debuginfo-lldb = "no lldb found"
582582
endif
583583

584+
ifeq ($(CFG_CLANG),)
585+
CTEST_DISABLE_codegen = "no clang found"
586+
endif
587+
584588
ifneq ($(CFG_OSTYPE),apple-darwin)
585589
CTEST_DISABLE_debuginfo-lldb = "lldb tests are only run on darwin"
586590
endif
@@ -641,6 +645,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
641645
--run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
642646
--rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
643647
--rustdoc-path $$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
648+
--clang-path $(if $(CFG_CLANG),$(CFG_CLANG),clang) \
644649
--llvm-bin-path $(CFG_LLVM_INST_DIR_$(CFG_BUILD))/bin \
645650
--aux-base $$(S)src/test/auxiliary/ \
646651
--stage-id stage$(1)-$(2) \

branches/tmp/src/compiletest/common.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ pub struct Config {
8080
// The python executable
8181
pub python: String,
8282

83+
// The clang executable
84+
pub clang_path: Option<PathBuf>,
85+
8386
// The llvm binaries path
8487
pub llvm_bin_path: Option<PathBuf>,
8588

branches/tmp/src/compiletest/compiletest.rs

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use std::fs;
3333
use std::path::{Path, PathBuf};
3434
use getopts::{optopt, optflag, reqopt};
3535
use common::Config;
36-
use common::{Pretty, DebugInfoGdb, DebugInfoLldb};
36+
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
3737
use util::logv;
3838

3939
pub mod procsrv;
@@ -63,6 +63,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
6363
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
6464
reqopt("", "rustdoc-path", "path to rustdoc to use for compiling", "PATH"),
6565
reqopt("", "python", "path to python to use for doc tests", "PATH"),
66+
optopt("", "clang-path", "path to executable for codegen tests", "PATH"),
6667
optopt("", "valgrind-path", "path to Valgrind executable for Valgrind tests", "PROGRAM"),
6768
optflag("", "force-valgrind", "fail if Valgrind tests cannot be run under Valgrind"),
6869
optopt("", "llvm-bin-path", "path to directory holding llvm binaries", "DIR"),
@@ -132,6 +133,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
132133
rustc_path: opt_path(matches, "rustc-path"),
133134
rustdoc_path: opt_path(matches, "rustdoc-path"),
134135
python: matches.opt_str("python").unwrap(),
136+
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::from(&s)),
135137
valgrind_path: matches.opt_str("valgrind-path"),
136138
force_valgrind: matches.opt_present("force-valgrind"),
137139
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::from(&s)),
@@ -282,7 +284,13 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
282284
let file = file.unwrap().path();
283285
debug!("inspecting file {:?}", file.display());
284286
if is_test(config, &file) {
285-
tests.push(make_test(config, &file))
287+
let t = make_test(config, &file, || {
288+
match config.mode {
289+
Codegen => make_metrics_test_closure(config, &file),
290+
_ => make_test_closure(config, &file)
291+
}
292+
});
293+
tests.push(t)
286294
}
287295
}
288296
tests
@@ -315,15 +323,16 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
315323
return valid;
316324
}
317325

318-
pub fn make_test(config: &Config, testfile: &Path) -> test::TestDescAndFn
326+
pub fn make_test<F>(config: &Config, testfile: &Path, f: F) -> test::TestDescAndFn where
327+
F: FnOnce() -> test::TestFn,
319328
{
320329
test::TestDescAndFn {
321330
desc: test::TestDesc {
322331
name: make_test_name(config, testfile),
323332
ignore: header::is_test_ignored(config, testfile),
324333
should_panic: test::ShouldPanic::No,
325334
},
326-
testfn: make_test_closure(config, &testfile),
335+
testfn: f(),
327336
}
328337
}
329338

@@ -348,6 +357,14 @@ pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
348357
}))
349358
}
350359

360+
pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
361+
let config = (*config).clone();
362+
let testfile = testfile.to_path_buf();
363+
test::DynMetricFn(box move |mm: &mut test::MetricMap| {
364+
runtest::run_metrics(config, &testfile, mm)
365+
})
366+
}
367+
351368
fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
352369
match full_version_line {
353370
Some(ref full_version_line)

0 commit comments

Comments
 (0)