Skip to content

Commit fbe69ce

Browse files
committed
---
yaml --- r: 165602 b: refs/heads/master c: ead198c h: refs/heads/master v: v3
1 parent 7819021 commit fbe69ce

File tree

593 files changed

+15126
-12535
lines changed

Some content is hidden

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

593 files changed

+15126
-12535
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: 4c3a8f17cc4bb4b68a910e028b50463d73429add
2+
refs/heads/master: ead198c5133fd649d1e385cfc46f344a2baaef8b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
55
refs/heads/try: aee614fc4973262a5a68efc643026e2b1458d65b

trunk/AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ Robert Irelan <[email protected]>
498498
Robert Knight <[email protected]>
499499
Robert Millar <[email protected]>
500500
Roland Tanglao <[email protected]>
501+
Rolf Timmermans <[email protected]>
501502
Ron Dahlgren <[email protected]>
502503
Roy Frostig <[email protected]>
503504

trunk/man/rustc.1

Lines changed: 79 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,75 +12,54 @@ This program is a compiler for the Rust language, available at
1212
.SH OPTIONS
1313

1414
.TP
15-
\fB\-\-crate-name NAME\fR
16-
Specify the name of the crate being built
17-
.TP
18-
\fB\-\-crate-type=[bin|lib|dylib|rlib|staticlib]\fR
19-
Configure the flavor of rust crate that is generated (default `bin`)
15+
\fB\-h\fR, \fB\-\-help\fR
16+
Display the help message
2017
.TP
2118
\fB\-\-cfg\fR SPEC
2219
Configure the compilation environment
2320
.TP
24-
\fB\-\-emit=[asm,ir,bc,obj,link]\fR
25-
Configure the output that rustc will produce
26-
.TP
27-
\fB\-h\fR, \fB\-\-help\fR
28-
Display this message
29-
.TP
3021
\fB\-L\fR PATH
3122
Add a directory to the library search path
3223
.TP
33-
\fB\-\-no\-trans\fR
34-
Run all passes except translation; no output
24+
\fB\-l\fR NAME[:KIND]
25+
Link the generated crate(s) to the specified native library NAME. The optional
26+
KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed.
3527
.TP
36-
\fB\-\-no\-analysis\fR
37-
Parse and expand the source, but run no analysis and produce no output
28+
\fB\-\-crate-type\fR [bin|lib|rlib|dylib|staticlib]
29+
Comma separated list of types of crates for the compiler to emit
3830
.TP
39-
\fB\-g\fR
40-
Emit DWARF debug information into object files generated.
31+
\fB\-\-crate-name NAME\fR
32+
Specify the name of the crate being built
4133
.TP
42-
\fB\-\-debuginfo\fR LEVEL
43-
Emit DWARF debug info to the objects created: 0 = no debug info, 1 =
44-
line-tables only (for stacktraces and breakpoints), 2 = full debug
45-
info with variable and type information (same as -g).
34+
\fB\-\-emit\fR [asm|llvm-bc|llvm-ir|obj|link|dep-info]
35+
Configure the output that rustc will produce
36+
.TP
37+
\fB\-\-print\fR [crate-name|output-file-names|sysroot]
38+
Comma separated list of compiler information to print on stdout
39+
.TP
40+
\fB\-g\fR
41+
Equivalent to \fI\-C\fR debuginfo=2
4642
.TP
4743
\fB\-O\fR
48-
Equivalent to \fI\-\-opt\-level=2\fR
44+
Equivalent to \fI\-C\fR opt-level=2
4945
.TP
5046
\fB\-o\fR FILENAME
51-
Write output to <filename>. Ignored if more than one --emit is specified.
52-
.TP
53-
\fB\-\-opt\-level\fR LEVEL
54-
Optimize with possible levels 0-3
47+
Write output to <filename>. Ignored if multiple \fI\-\-emit\fR outputs are
48+
specified.
5549
.TP
5650
\fB\-\-out\-dir\fR DIR
57-
Write output to compiler-chosen filename in <dir>. Ignored if -o is specified.
58-
(default the current directory)
59-
.TP
60-
\fB\-\-parse\-only\fR
61-
Parse only; do not compile, assemble, or link
51+
Write output to compiler-chosen filename in <dir>. Ignored if \fI\-o\fR is
52+
specified. Defaults to the current directory.
6253
.TP
63-
\fB\-\-pretty\fR [TYPE]
64-
Pretty-print the input instead of compiling; valid types are: normal
65-
(un-annotated source), expanded (crates expanded), typed (crates
66-
expanded, with type annotations), identified (fully parenthesized,
67-
AST nodes and blocks with IDs), or flowgraph=<nodeid> (graphviz
68-
formatted flowgraph for node)
69-
.TP
70-
\fB\-\-dep-info\fR [FILENAME]
71-
Output dependency info to <filename> after compiling, in a format suitable
72-
for use by Makefiles.
73-
.TP
74-
\fB\-\-sysroot\fR PATH
75-
Override the system root
54+
\fB\-\-explain\fR OPT
55+
Provide a detailed explanation of an error message
7656
.TP
7757
\fB\-\-test\fR
7858
Build a test harness
7959
.TP
8060
\fB\-\-target\fR TRIPLE
81-
Target triple cpu-manufacturer-kernel[-os] to compile for (see
82-
http://sources.redhat.com/autobook/autobook/autobook_17.html
83-
for details)
61+
Target triple cpu-manufacturer-kernel[-os] to compile for (see chapter 3.4 of
62+
http://www.sourceware.org/autobook/ for details)
8463
.TP
8564
\fB\-W\fR help
8665
Print 'lint' options and default settings
@@ -97,15 +76,30 @@ Set lint denied
9776
\fB\-F\fR OPT, \fB\-\-forbid\fR OPT
9877
Set lint forbidden
9978
.TP
100-
\fB\-Z\fR FLAG
101-
Set internal debugging options. Use "-Z help" to print available options.
102-
.TP
10379
\fB\-C\fR FLAG[=VAL], \fB\-\-codegen\fR FLAG[=VAL]
10480
Set a codegen-related flag to the value specified. Use "-C help" to print
10581
available flags. See CODEGEN OPTIONS below
10682
.TP
107-
\fB\-v\fR, \fB\-\-version\fR
83+
\fB\-V\fR, \fB\-\-version\fR
10884
Print version info and exit
85+
.TP
86+
\fB\-v\fR, \fB\-\-verbose\fR
87+
Use verbose output
88+
.TP
89+
\fB\-\-extern\fR NAME=PATH
90+
Specify where an external rust library is located
91+
.TP
92+
\fB\-\-sysroot\fR PATH
93+
Override the system root
94+
.TP
95+
\fB\-Z\fR FLAG
96+
Set internal debugging options. Use "-Z help" to print available options.
97+
.TP
98+
\fB\-\-color\fR auto|always|never
99+
Configure coloring of output:
100+
auto = colorize, if output goes to a tty (default);
101+
always = always colorize output;
102+
never = never colorize output
109103

110104
.SH CODEGEN OPTIONS
111105

@@ -121,6 +115,9 @@ objects.
121115
A space-separated list of extra arguments to pass to the linker when the linker
122116
is invoked.
123117
.TP
118+
\fBlto\fR
119+
Perform LLVM link-time optimizations.
120+
.TP
124121
\fBtarget-cpu\fR=help
125122
Selects a target processor. If the value is 'help', then a list of available
126123
CPUs is printed.
@@ -167,8 +164,38 @@ Prefers dynamic linking to static linking.
167164
\fBno-integrated-as\fR
168165
Force usage of an external assembler rather than LLVM's integrated one.
169166
.TP
167+
\fBno-redzone\fR
168+
Disable the use of the redzone.
169+
.TP
170170
\fBrelocation-model\fR=[pic,static,dynamic-no-pic]
171-
The relocation model to use. (default: pic)
171+
The relocation model to use. (Default: pic)
172+
.TP
173+
\fBcode-model\fR=[small,kernel,medium,large]
174+
Choose the code model to use.
175+
.TP
176+
\fBmetadata\fR=val
177+
Metadata to mangle symbol names with.
178+
.TP
179+
\fBextra-filename\fR=val
180+
Extra data to put in each output filename.
181+
.TP
182+
\fBcodegen-units\fR=val
183+
Divide crate into N units to optimize in parallel.
184+
.TP
185+
\fBremark\fR=val
186+
Print remarks for these optimization passes (space separated, or "all").
187+
.TP
188+
\fBno-stack-check\fR
189+
Disable checks for stack exhaustion (a memory-safety hazard!).
190+
.TP
191+
\fBdebuginfo\fR=val
192+
Debug info emission level:
193+
0 = no debug info;
194+
1 = line-tables only (for stacktraces and breakpoints);
195+
2 = full debug info with variable and type information.
196+
.TP
197+
\fBopt-level\fR=val
198+
Optimize with possible levels 0-3
172199

173200
.SH "EXAMPLES"
174201
To build an executable from a source file with a main function:

trunk/mk/crates.mk

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test time rand \
5454
log regex graphviz core rbml alloc \
5555
unicode
56-
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_driver rustc_trans rustc_back rustc_llvm
56+
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
57+
rustc_trans rustc_back rustc_llvm
5758
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
5859
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5960
TOOLS := compiletest rustdoc rustc
@@ -67,11 +68,12 @@ DEPS_std := core libc rand alloc collections unicode \
6768
DEPS_graphviz := std
6869
DEPS_syntax := std term serialize log fmt_macros arena libc
6970
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
70-
rustc_typeck log syntax serialize rustc_llvm rustc_trans
71+
rustc_typeck rustc_resolve log syntax serialize rustc_llvm rustc_trans
7172
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
7273
log syntax serialize rustc_llvm
7374
DEPS_rustc_typeck := rustc syntax
7475
DEPS_rustc_borrowck := rustc log graphviz syntax
76+
DEPS_rustc_resolve := rustc log syntax
7577
DEPS_rustc := syntax flate arena serialize getopts rbml \
7678
time log graphviz rustc_llvm rustc_back
7779
DEPS_rustc_llvm := native:rustllvm libc std
@@ -118,9 +120,11 @@ DOC_CRATES := $(filter-out rustc, \
118120
$(filter-out rustc_trans, \
119121
$(filter-out rustc_typeck, \
120122
$(filter-out rustc_borrowck, \
123+
$(filter-out rustc_resolve, \
121124
$(filter-out rustc_driver, \
122-
$(filter-out syntax, $(CRATES)))))))
123-
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_typeck rustc_driver syntax
125+
$(filter-out syntax, $(CRATES))))))))
126+
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
127+
rustc_typeck rustc_driver syntax
124128

125129
# This macro creates some simple definitions for each crate being built, just
126130
# some munging of all of the parameters above.

trunk/mk/docs.mk

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -216,36 +216,6 @@ endef
216216
$(foreach docname,$(DOCS),$(eval $(call DEF_DOC,$(docname))))
217217

218218

219-
# Localized documentation
220-
221-
# FIXME: I (huonw) haven't actually been able to test properly, since
222-
# e.g. (by default) I'm doing an out-of-tree build (#12763), but even
223-
# adjusting for that, the files are too old(?) and are rejected by
224-
# po4a.
225-
#
226-
# As such, I've attempted to get it working as much as possible (and
227-
# switching from pandoc to rustdoc), but preserving the old behaviour
228-
# (e.g. only running on the guide)
229-
.PHONY: l10n-mds
230-
l10n-mds: $(D)/po4a.conf \
231-
$(foreach lang,$(L10N_LANG),$(D)/po/$(lang)/*.md.po)
232-
$(warning WARNING: localized documentation is experimental)
233-
po4a --copyright-holder="The Rust Project Developers" \
234-
--package-name="Rust" \
235-
--package-version="$(CFG_RELEASE)" \
236-
-M UTF-8 -L UTF-8 \
237-
$(D)/po4a.conf
238-
239-
define DEF_L10N_DOC
240-
DOC_L10N_TARGETS += doc/l10n/$(1)/$(2).html
241-
doc/l10n/$(1)/$(2).html: l10n-mds $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(2))
242-
@$$(call E, rustdoc: $$@)
243-
$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) doc/l10n/$(1)/$(2).md
244-
endef
245-
246-
$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),guide)))
247-
248-
249219
######################################################################
250220
# Rustdoc (libstd/extra)
251221
######################################################################
@@ -294,7 +264,3 @@ endif
294264

295265
docs: $(DOC_TARGETS)
296266
compiler-docs: $(COMPILER_DOC_TARGETS)
297-
298-
docs-l10n: $(DOC_L10N_TARGETS)
299-
300-
.PHONY: docs-l10n

trunk/mk/rt.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# that's per-target so you're allowed to conditionally add files based on the
3636
# target.
3737
################################################################################
38-
NATIVE_LIBS := rust_builtin hoedown morestack miniz context_switch \
38+
NATIVE_LIBS := rust_builtin hoedown morestack miniz \
3939
rustrt_native rust_test_helpers
4040

4141
# $(1) is the target triple
@@ -58,8 +58,7 @@ NATIVE_DEPS_rustrt_native_$(1) := \
5858
arch/$$(HOST_$(1))/record_sp.S
5959
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
6060
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
61-
NATIVE_DEPS_context_switch_$(1) := \
62-
arch/$$(HOST_$(1))/_context.S
61+
6362

6463
################################################################################
6564
# You shouldn't find it that necessary to edit anything below this line.

trunk/mk/tests.mk

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ $(eval $(call RUST_CRATE,coretest))
2121

2222
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
24-
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_trans,$(HOST_CRATES))
24+
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans,\
25+
$(HOST_CRATES))
2526
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2627

2728
######################################################################
@@ -73,21 +74,6 @@ endif
7374
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
7475
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
7576

76-
TEST_RATCHET_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4)-metrics.json
77-
TEST_RATCHET_NOISE_PERCENT=10.0
78-
79-
# Whether to ratchet or merely save benchmarks
80-
ifdef CFG_RATCHET_BENCH
81-
CRATE_TEST_EXTRA_ARGS= \
82-
--test $(TEST_BENCH) \
83-
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
84-
--ratchet-noise-percent $(TEST_RATCHET_NOISE_PERCENT)
85-
else
86-
CRATE_TEST_EXTRA_ARGS= \
87-
--test $(TEST_BENCH) \
88-
--save-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4))
89-
endif
90-
9177
# If we're sharding the testsuite between parallel testers,
9278
# pass this argument along to the compiletest and crate test
9379
# invocations.
@@ -454,7 +440,6 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
454440
$$(Q)touch tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
455441
$$(Q)$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log tmp/
456442
$$(Q)$(CFG_ADB) shell rm $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
457-
$$(Q)$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/$$(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) tmp/
458443
@if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
459444
then \
460445
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
@@ -696,7 +681,6 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
696681
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
697682
--src-base $$(S)src/test/$$(CTEST_SRC_BASE_$(4))/ \
698683
--build-base $(3)/test/$$(CTEST_BUILD_BASE_$(4))/ \
699-
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
700684
--mode $$(CTEST_MODE_$(4)) \
701685
$$(CTEST_RUNTOOL_$(4))
702686

trunk/src/compiletest/compiletest.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
152152
matches.opt_str("ratchet-metrics").map(|s| Path::new(s)),
153153
ratchet_noise_percent:
154154
matches.opt_str("ratchet-noise-percent")
155-
.and_then(|s| from_str::<f64>(s.as_slice())),
155+
.and_then(|s| s.as_slice().parse::<f64>()),
156156
runtool: matches.opt_str("runtool"),
157157
host_rustcflags: matches.opt_str("host-rustcflags"),
158158
target_rustcflags: matches.opt_str("target-rustcflags"),
@@ -190,9 +190,7 @@ pub fn log_config(config: &Config) {
190190
logv(c, format!("filter: {}",
191191
opt_str(&config.filter
192192
.as_ref()
193-
.map(|re| {
194-
re.to_string().into_string()
195-
}))));
193+
.map(|re| re.to_string()))));
196194
logv(c, format!("runtool: {}", opt_str(&config.runtool)));
197195
logv(c, format!("host-rustcflags: {}",
198196
opt_str(&config.host_rustcflags)));

trunk/src/compiletest/header.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
351351
panic!("{}", error_string);
352352
}
353353

354-
let major: int = from_str(components[0]).expect(error_string);
355-
let minor: int = from_str(components[1]).expect(error_string);
354+
let major: int = components[0].parse().expect(error_string);
355+
let minor: int = components[1].parse().expect(error_string);
356356

357357
return major * 1000 + minor;
358358
}
@@ -362,6 +362,6 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
362362
"Encountered LLDB version string with unexpected format: {}",
363363
version_string);
364364
let error_string = error_string.as_slice();
365-
let major: int = from_str(version_string).expect(error_string);
365+
let major: int = version_string.parse().expect(error_string);
366366
return major;
367367
}

0 commit comments

Comments
 (0)