Skip to content

Commit c4f5f19

Browse files
committed
---
yaml --- r: 149020 b: refs/heads/try2 c: 30dcc82 h: refs/heads/master v: v3
1 parent 1e93cee commit c4f5f19

File tree

661 files changed

+6589
-7626
lines changed

Some content is hidden

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

661 files changed

+6589
-7626
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: fddc18ec4b8a9c261ae732dde1120d663599ef64
8+
refs/heads/try2: 30dcc8285bf64e50e7b1b51b351465d99fb5c8a7
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ src/.DS_Store
7575
/nd/
7676
/llvm/
7777
version.md
78+
*.tex
7879
keywords.md
7980
x86_64-apple-darwin/
8081
x86_64-unknown-linux-gnu/

branches/try2/man/rustc.1

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

1414
.TP
15-
\fB\-\-crate-type=[bin|lib|dylib|rlib|staticlib]\fR
16-
Configure the flavor of rust crate that is generated (default `bin`)
15+
\fB\-\-bin\fR
16+
Compile an executable crate (default)
17+
.TP
18+
\fB\-c\fR
19+
Compile and assemble, but do not link
1720
.TP
1821
\fB\-\-cfg\fR SPEC
1922
Configure the compilation environment
2023
.TP
21-
\fB\-\-emit=[asm,ir,bc,obj,link]\fR
22-
Configure the output that rustc will produce
24+
\fB\-\-emit\-llvm\fR
25+
Produce an LLVM bitcode file
2326
.TP
2427
\fB\-h\fR, \fB\-\-help\fR
2528
Display this message
2629
.TP
2730
\fB\-L\fR PATH
2831
Add a directory to the library search path
2932
.TP
33+
\fB\-\-lib\fR
34+
Compile a library crate
35+
.TP
3036
\fB\-\-linker\fR LINKER
3137
Program to use for linking instead of the default
3238
.TP
@@ -43,7 +49,7 @@ Run all passes except translation; no output
4349
Equivalent to \fI\-\-opt\-level=2\fR
4450
.TP
4551
\fB\-o\fR FILENAME
46-
Write output to <filename>. Ignored if more than one --emit is specified.
52+
Write output to <filename>
4753
.TP
4854
\fB\-\-opt\-level\fR LEVEL
4955
Optimize with possible levels 0-3
@@ -54,8 +60,7 @@ the default passes for the optimization level. A value of 'list'
5460
will list the available passes.
5561
.TP
5662
\fB\-\-out\-dir\fR DIR
57-
Write output to compiler-chosen filename in <dir>. Ignored if -o is specified.
58-
(default the current directory)
63+
Write output to compiler-chosen filename in <dir>
5964
.TP
6065
\fB\-\-parse\-only\fR
6166
Parse only; do not compile, assemble, or link
@@ -66,6 +71,9 @@ Pretty-print the input instead of compiling; valid types are: normal
6671
expanded, with type annotations), or identified (fully parenthesized,
6772
AST nodes and blocks with IDs)
6873
.TP
74+
\fB\-S\fR
75+
Compile only; do not assemble or link
76+
.TP
6977
\fB\-\-save\-temps\fR
7078
Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
7179
.TP
@@ -112,7 +120,7 @@ To build an executable from a source file with a main function:
112120
$ rustc -o hello hello.rs
113121

114122
To build a library from a source file:
115-
$ rustc --crate-type=lib hello-lib.rs
123+
$ rustc --lib hello-lib.rs
116124

117125
To build either with a crate (.rs) file:
118126
$ rustc hello.rs

branches/try2/mk/crates.mk

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,33 +49,29 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53-
uuid serialize sync getopts collections
52+
TARGET_CRATES := std extra green rustuv native flate arena glob term semver uuid serialize sync
5453
HOST_CRATES := syntax rustc rustdoc
5554
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5655
TOOLS := compiletest rustdoc rustc
5756

5857
DEPS_std := native:rustrt
59-
DEPS_extra := std term sync serialize getopts collections
58+
DEPS_extra := std serialize sync term
6059
DEPS_green := std
6160
DEPS_rustuv := std native:uv native:uv_support
6261
DEPS_native := std
63-
DEPS_syntax := std extra term serialize collections
64-
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
65-
collections
66-
DEPS_rustdoc := rustc native:sundown serialize sync getopts collections
62+
DEPS_syntax := std extra term serialize
63+
DEPS_rustc := syntax native:rustllvm flate arena serialize sync
64+
DEPS_rustdoc := rustc native:sundown serialize sync
6765
DEPS_flate := std native:miniz
68-
DEPS_arena := std collections
66+
DEPS_arena := std extra
6967
DEPS_glob := std
7068
DEPS_serialize := std
7169
DEPS_term := std
7270
DEPS_semver := std
7371
DEPS_uuid := std serialize
7472
DEPS_sync := std
75-
DEPS_getopts := std
76-
DEPS_collections := std serialize
7773

78-
TOOL_DEPS_compiletest := extra green rustuv getopts
74+
TOOL_DEPS_compiletest := extra green rustuv
7975
TOOL_DEPS_rustdoc := rustdoc green rustuv
8076
TOOL_DEPS_rustc := rustc green rustuv
8177
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
@@ -106,7 +102,7 @@ $(foreach crate,$(CRATES),$(eval $(call RUST_CRATE,$(crate))))
106102
#
107103
# $(1) is the crate to generate variables for
108104
define RUST_TOOL
109-
TOOL_INPUTS_$(1) := $$(wildcard $$(addprefix $$(dir $$(TOOL_SOURCE_$(1))), \
105+
TOOL_INPUTS_$(1) := $$(wildcard $$(addprefix $(S)$$(dir $$(TOOL_SOURCE_$(1))), \
110106
*.rs */*.rs */*/*.rs */*/*/*.rs))
111107
endef
112108

branches/try2/mk/dist.mk

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,19 @@ PKG_FILES := \
2626
$(S)man \
2727
$(S)doc \
2828
$(addprefix $(S)src/, \
29-
README.md \
30-
compiletest \
29+
README.txt \
3130
driver \
31+
librustc \
32+
compiletest \
3233
etc \
33-
$(foreach crate,$(CRATES),lib$(crate)) \
34+
libextra \
35+
libstd \
36+
libsyntax \
37+
librustuv \
38+
libgreen \
39+
libnative \
3440
rt \
41+
librustdoc \
3542
rustllvm \
3643
snapshots.txt \
3744
test) \

branches/try2/mk/docs.mk

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ HTML_DEPS := doc/
1919

2020
BASE_DOC_OPTS := --standalone --toc --number-sections
2121
HTML_OPTS = $(BASE_DOC_OPTS) --to=html5 --section-divs --css=rust.css \
22-
--include-before-body=doc/version_info.html \
23-
--include-in-header=doc/favicon.inc --include-after-body=doc/footer.inc
24-
TEX_OPTS = $(BASE_DOC_OPTS) --include-before-body=doc/version.md \
25-
--from=markdown --include-before-body=doc/footer.tex --to=latex
22+
--include-before-body=doc/version_info.html --include-in-header=doc/favicon.inc
23+
TEX_OPTS = $(BASE_DOC_OPTS) --include-before-body=doc/version.md --to=latex
2624
EPUB_OPTS = $(BASE_DOC_OPTS) --to=epub
2725

2826
D := $(S)src/doc
@@ -57,21 +55,12 @@ doc/rust.css: $(D)/rust.css | doc/
5755
@$(call E, cp: $@)
5856
$(Q)cp -a $< $@ 2> /dev/null
5957

60-
HTML_DEPS += doc/favicon.inc
61-
doc/favicon.inc: $(D)/favicon.inc | doc/
62-
@$(call E, cp: $@)
63-
$(Q)cp -a $< $@ 2> /dev/null
64-
6558
doc/full-toc.inc: $(D)/full-toc.inc | doc/
6659
@$(call E, cp: $@)
6760
$(Q)cp -a $< $@ 2> /dev/null
6861

69-
HTML_DEPS += doc/footer.inc
70-
doc/footer.inc: $(D)/footer.inc | doc/
71-
@$(call E, cp: $@)
72-
$(Q)cp -a $< $@ 2> /dev/null
73-
74-
doc/footer.tex: $(D)/footer.tex | doc/
62+
HTML_DEPS += doc/favicon.inc
63+
doc/favicon.inc: $(D)/favicon.inc | doc/
7564
@$(call E, cp: $@)
7665
$(Q)cp -a $< $@ 2> /dev/null
7766

@@ -94,7 +83,7 @@ doc/rust.html: $(D)/rust.md doc/full-toc.inc $(HTML_DEPS) | doc/
9483
$(CFG_PANDOC) $(HTML_OPTS) --include-in-header=doc/full-toc.inc --output=$@
9584

9685
DOCS += doc/rust.tex
97-
doc/rust.tex: $(D)/rust.md doc/footer.tex doc/version.md | doc/
86+
doc/rust.tex: $(D)/rust.md doc/version.md | doc/
9887
@$(call E, pandoc: $@)
9988
$(Q)$(CFG_NODE) $(D)/prep.js $< | \
10089
$(CFG_PANDOC) $(TEX_OPTS) --output=$@
@@ -118,7 +107,7 @@ doc/tutorial.html: $(D)/tutorial.md $(HTML_DEPS)
118107
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
119108

120109
DOCS += doc/tutorial.tex
121-
doc/tutorial.tex: $(D)/tutorial.md doc/footer.tex doc/version.md
110+
doc/tutorial.tex: $(D)/tutorial.md doc/version.md
122111
@$(call E, pandoc: $@)
123112
$(Q)$(CFG_NODE) $(D)/prep.js $< | \
124113
$(CFG_PANDOC) $(TEX_OPTS) --output=$@
@@ -160,12 +149,6 @@ doc/complement-project-faq.html: $(D)/complement-project-faq.md $(HTML_DEPS)
160149
$(Q)$(CFG_NODE) $(D)/prep.js --highlight $< | \
161150
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
162151

163-
DOCS += doc/complement-usage-faq.html
164-
doc/complement-usage-faq.html: $(D)/complement-usage-faq.md $(HTML_DEPS)
165-
@$(call E, pandoc: $@)
166-
$(Q)$(CFG_NODE) $(D)/prep.js --highlight $< | \
167-
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
168-
169152
DOCS += doc/complement-cheatsheet.html
170153
doc/complement-cheatsheet.html: $(D)/complement-cheatsheet.md doc/full-toc.inc $(HTML_DEPS)
171154
@$(call E, pandoc: $@)
@@ -216,6 +199,12 @@ doc/guide-tasks.html: $(D)/guide-tasks.md $(HTML_DEPS)
216199
$(Q)$(CFG_NODE) $(D)/prep.js --highlight $< | \
217200
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
218201

202+
DOCS += doc/guide-conditions.html
203+
doc/guide-conditions.html: $(D)/guide-conditions.md $(HTML_DEPS)
204+
@$(call E, pandoc: $@)
205+
$(Q)$(CFG_NODE) $(D)/prep.js --highlight $< | \
206+
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
207+
219208
DOCS += doc/guide-pointers.html
220209
doc/guide-pointers.html: $(D)/guide-pointers.md $(HTML_DEPS)
221210
@$(call E, pandoc: $@)
@@ -286,7 +275,8 @@ endif
286275

287276
# The rustdoc executable, rpath included in case --disable-rpath was provided to
288277
# ./configure
289-
RUSTDOC = $(HBIN2_H_$(CFG_BUILD))/rustdoc$(X_$(CFG_BUILD))
278+
RUSTDOC = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
279+
$(HBIN2_H_$(CFG_BUILD))/rustdoc$(X_$(CFG_BUILD))
290280

291281
# The library documenting macro
292282
#
@@ -301,9 +291,7 @@ doc/$(1)/index.html: \
301291
$$(foreach dep,$$(RUST_DEPS_$(1)), \
302292
$$(TLIB2_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.$$(dep))
303293
@$$(call E, rustdoc: $$@)
304-
$$(Q)$$(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $$(RUSTDOC) \
305-
--cfg stage2 $$<
306-
294+
$$(Q)$$(RUSTDOC) --cfg stage2 $$<
307295
endef
308296

309297
$(foreach crate,$(CRATES),$(eval $(call libdoc,$(crate))))

branches/try2/mk/tests.mk

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2121

2222
# Markdown files under doc/ that should have their code extracted and run
2323
DOC_TEST_NAMES = tutorial guide-ffi guide-macros guide-lifetimes \
24-
guide-tasks guide-container guide-pointers \
24+
guide-tasks guide-conditions guide-container guide-pointers \
2525
complement-cheatsheet guide-runtime \
2626
rust
2727

@@ -116,11 +116,9 @@ endif
116116

117117
# Run the compiletest runner itself under valgrind
118118
ifdef CTEST_VALGRIND
119-
CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
120-
$$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(2),$$(3))
119+
CFG_RUN_CTEST_$(1)=$$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(2),$$(3))
121120
else
122-
CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
123-
$$(call CFG_RUN_$$(CFG_BUILD),$$(TLIB$$(1)_T_$$(3)_H_$$(3)),$$(2))
121+
CFG_RUN_CTEST_$(1)=$$(call CFG_RUN_$$(CFG_BUILD),$$(TLIB$$(1)_T_$$(3)_H_$$(3)),$$(2))
124122
endif
125123

126124
endef
@@ -244,6 +242,7 @@ ALL_HS := $(filter-out $(S)src/rt/vg/valgrind.h \
244242
tidy:
245243
@$(call E, check: formatting)
246244
$(Q)find $(S)src -name '*.r[sc]' \
245+
| grep '^$(S)src/test' -v \
247246
| grep '^$(S)src/libuv' -v \
248247
| grep '^$(S)src/llvm' -v \
249248
| grep '^$(S)src/gyp' -v \
@@ -836,7 +835,7 @@ $$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB): \
836835
tmp/$$(FT).rc \
837836
$$(SREQ2_T_$(2)_H_$(3))
838837
@$$(call E, compile_and_link: $$@)
839-
$$(STAGE2_T_$(2)_H_$(3)) --crate-type=dylib --out-dir $$(@D) $$< \
838+
$$(STAGE2_T_$(2)_H_$(3)) --lib -o $$@ $$< \
840839
-L "$$(RT_OUTPUT_DIR_$(2))"
841840

842841
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)): \

branches/try2/src/compiletest/compiletest.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
#[deny(warnings)];
1515

1616
extern mod extra;
17-
extern mod getopts;
1817

1918
use std::os;
2019
use std::io;
2120
use std::io::fs;
2221

23-
use getopts::{optopt, optflag, reqopt};
22+
use extra::getopts;
23+
use extra::getopts::groups::{optopt, optflag, reqopt};
2424
use extra::test;
2525

2626
use common::config;
@@ -49,7 +49,7 @@ pub fn main() {
4949

5050
pub fn parse_config(args: ~[~str]) -> config {
5151

52-
let groups : ~[getopts::OptGroup] =
52+
let groups : ~[getopts::groups::OptGroup] =
5353
~[reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
5454
reqopt("", "run-lib-path", "path to target shared libraries", "PATH"),
5555
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
@@ -85,20 +85,20 @@ pub fn parse_config(args: ~[~str]) -> config {
8585
let args_ = args.tail();
8686
if args[1] == ~"-h" || args[1] == ~"--help" {
8787
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
88-
println!("{}", getopts::usage(message, groups));
88+
println!("{}", getopts::groups::usage(message, groups));
8989
println!("");
9090
fail!()
9191
}
9292

9393
let matches =
94-
&match getopts::getopts(args_, groups) {
94+
&match getopts::groups::getopts(args_, groups) {
9595
Ok(m) => m,
9696
Err(f) => fail!("{}", f.to_err_msg())
9797
};
9898

9999
if matches.opt_present("h") || matches.opt_present("help") {
100100
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
101-
println!("{}", getopts::usage(message, groups));
101+
println!("{}", getopts::groups::usage(message, groups));
102102
println!("");
103103
fail!()
104104
}

0 commit comments

Comments
 (0)