Skip to content

Commit 73ca042

Browse files
committed
---
yaml --- r: 149067 b: refs/heads/try2 c: cf9164f h: refs/heads/master i: 149065: 3333237 149063: c071740 v: v3
1 parent 433793c commit 73ca042

File tree

617 files changed

+6612
-2796
lines changed

Some content is hidden

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

617 files changed

+6612
-2796
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: 31576c7ef0988b2b4c6133c2dfc95b446237a5da
8+
refs/heads/try2: cf9164f94c6a7e3717f67b1fb74a7662639835f0
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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ src/.DS_Store
7575
/nd/
7676
/llvm/
7777
version.md
78-
*.tex
7978
keywords.md
8079
x86_64-apple-darwin/
8180
x86_64-unknown-linux-gnu/

branches/try2/Makefile.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ ifdef TRACE
126126
endif
127127
ifdef CFG_DISABLE_RPATH
128128
# NOTE: make this CFG_RUSTC_FLAGS after stage0 snapshot
129-
RUSTFLAGS_STAGE1 += --no-rpath
130-
RUSTFLAGS_STAGE2 += --no-rpath
131-
RUSTFLAGS_STAGE3 += --no-rpath
129+
RUSTFLAGS_STAGE1 += -C no-rpath
130+
RUSTFLAGS_STAGE2 += -C no-rpath
131+
RUSTFLAGS_STAGE3 += -C no-rpath
132132
endif
133133

134134
# The executables crated during this compilation process have no need to include
@@ -141,7 +141,7 @@ endif
141141
# worry about the distribution of one file (with its native dynamic
142142
# dependencies)
143143
RUSTFLAGS_STAGE0 += -Z prefer-dynamic
144-
RUSTFLAGS_STAGE1 += -Z prefer-dynamic
144+
RUSTFLAGS_STAGE1 += -C prefer-dynamic
145145

146146
# platform-specific auto-configuration
147147
include $(CFG_SRC_DIR)mk/platform.mk

branches/try2/man/rustc.1

Lines changed: 76 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,15 @@ Display this message
2727
\fB\-L\fR PATH
2828
Add a directory to the library search path
2929
.TP
30-
\fB\-\-linker\fR LINKER
31-
Program to use for linking instead of the default
32-
.TP
33-
\fB\-\-link-args\fR FLAGS
34-
A space-separated list of flags passed to the linker
35-
.TP
3630
\fB\-\-ls\fR
3731
List the symbols defined by a library crate
3832
.TP
3933
\fB\-\-no\-trans\fR
4034
Run all passes except translation; no output
4135
.TP
36+
\fB\-g\fR, \fB\-\-debuginfo\fR
37+
Emit DWARF debug information into object files generated.
38+
.TP
4239
\fB\-O\fR
4340
Equivalent to \fI\-\-opt\-level=2\fR
4441
.TP
@@ -48,11 +45,6 @@ Write output to <filename>. Ignored if more than one --emit is specified.
4845
\fB\-\-opt\-level\fR LEVEL
4946
Optimize with possible levels 0-3
5047
.TP
51-
\fB\-\-passes\fR NAMES
52-
Comma- or space-separated list of optimization passes. Overrides
53-
the default passes for the optimization level. A value of 'list'
54-
will list the available passes.
55-
.TP
5648
\fB\-\-out\-dir\fR DIR
5749
Write output to compiler-chosen filename in <dir>. Ignored if -o is specified.
5850
(default the current directory)
@@ -66,9 +58,6 @@ Pretty-print the input instead of compiling; valid types are: normal
6658
expanded, with type annotations), or identified (fully parenthesized,
6759
AST nodes and blocks with IDs)
6860
.TP
69-
\fB\-\-save\-temps\fR
70-
Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
71-
.TP
7261
\fB\-\-sysroot\fR PATH
7362
Override the system root
7463
.TP
@@ -80,12 +69,6 @@ Target triple cpu-manufacturer-kernel[-os] to compile for (see
8069
http://sources.redhat.com/autobook/autobook/autobook_17.html
8170
for details)
8271
.TP
83-
\fB\-\-target-feature\fR TRIPLE
84-
Target-specific attributes (see llc -mattr=help for details)
85-
.TP
86-
\fB\-\-android-cross-path\fR PATH
87-
The path to the Android NDK
88-
.TP
8972
\fB\-W\fR help
9073
Print 'lint' options and default settings
9174
.TP
@@ -104,9 +87,80 @@ Set lint forbidden
10487
\fB\-Z\fR FLAG
10588
Set internal debugging options. Use "-Z help" to print available options.
10689
.TP
90+
\fB\-C\fR FLAG[=VAL], \fB\-\-codegen\fR FLAG[=VAL]
91+
Set a codegen-related flag to the value specifie.d Use "-C help" to print
92+
available flags. See CODEGEN OPTIONS below
93+
.TP
10794
\fB\-v\fR, \fB\-\-version\fR
10895
Print version info and exit
10996

97+
.SH CODEGEN OPTIONS
98+
99+
.TP
100+
\fBar\fR=/path/to/ar
101+
Path to the archive utility to use when assembling archives.
102+
.TP
103+
\fBlinker\fR=/path/to/cc
104+
Path to the linker utility to use when linking libraries, executables, and
105+
objects.
106+
.TP
107+
\fBlink-args\fR='-flag1 -flag2'
108+
A space-separated list of extra arguments to pass to the linker when the linker
109+
is invoked.
110+
.TP
111+
\fBtarget-cpu\fR=help
112+
Selects a target processor. If the value is 'help', then a list of available
113+
cpus is printed.
114+
.TP
115+
\fBtarget-feature\fR='+feature1 -feature2'
116+
A space-separated list of features to enable or disable for the target. A
117+
preceding '+' enables a feature while a preceding '-' disables it. Available
118+
features can be discovered through target-cpu=help.
119+
.TP
120+
\fBpasses\fR=list
121+
A space-separated list of extra LLVM passes to run. A value of 'list' will
122+
cause rustc to print all known passes and exit. The passes specified are
123+
appended at the end of the normal pass manager.
124+
.TP
125+
\fBllvm-args\fR='-arg1 -arg2'
126+
A space-separted list of argument to pass through to LLVM.
127+
.TP
128+
\fBsave-temps\fR
129+
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
130+
throughout compilation in the output directory.
131+
.TP
132+
\fBandroid-cross-path\fR=path/to/ndk/bin
133+
Directory to find the Android NDK cross-compilation tools
134+
.TP
135+
\fBno-rpath\fR
136+
If specified, then the rpath value for dynamic libraries will not be set in
137+
either dynamic library or executable outputs.
138+
.TP
139+
\fBno-prepopulate-passes\fR
140+
Suppresses pre-population of the LLVM pass manager that is run over the module.
141+
.TP
142+
\fBno-vectorize-loops\fR
143+
Suppresses running the loop vectorization LLVM pass, regardless of optimization
144+
level.
145+
.TP
146+
\fBno-vectorize-slp\fR
147+
Suppresses running the LLVM SLP vectorization pass, regardless of optimization
148+
level.
149+
.TP
150+
\fBsoft-float\fR
151+
Generates software floating point library calls instead of hardware
152+
instructions.
153+
.TP
154+
\fBgen-crate-map\fR
155+
Forces generate of a toplevel crate map. May be required for logging to work
156+
when rust is embedded into another application.
157+
.TP
158+
\fBprefer-dynamic\fR
159+
Prefers dynamic linking to static linking.
160+
.TP
161+
\fBno-integrated-as\fR
162+
Force usage of an external assembler rather than LLVM's integrated one.
163+
110164
.SH "EXAMPLES"
111165
To build an executable from a source file with a main function:
112166
$ rustc -o hello hello.rs
@@ -117,8 +171,8 @@ To build a library from a source file:
117171
To build either with a crate (.rs) file:
118172
$ rustc hello.rs
119173

120-
To build an executable with debug info (experimental):
121-
$ rustc -Z debug-info -o hello hello.rs
174+
To build an executable with debug info:
175+
$ rustc -g -o hello hello.rs
122176

123177
.SH "SEE ALSO"
124178

branches/try2/mk/crates.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
################################################################################
5151

5252
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53-
uuid serialize sync getopts collections
53+
uuid serialize sync getopts collections fourcc
5454
HOST_CRATES := syntax rustc rustdoc
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
@@ -74,6 +74,7 @@ DEPS_uuid := std serialize
7474
DEPS_sync := std
7575
DEPS_getopts := std
7676
DEPS_collections := std serialize
77+
DEPS_fourcc := syntax std
7778

7879
TOOL_DEPS_compiletest := extra green rustuv getopts
7980
TOOL_DEPS_rustdoc := rustdoc green rustuv

branches/try2/mk/dist.mk

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

branches/try2/mk/docs.mk

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ 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 --include-in-header=doc/favicon.inc
23-
TEX_OPTS = $(BASE_DOC_OPTS) --include-before-body=doc/version.md --to=latex
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
2426
EPUB_OPTS = $(BASE_DOC_OPTS) --to=epub
2527

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

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+
5865
doc/full-toc.inc: $(D)/full-toc.inc | doc/
5966
@$(call E, cp: $@)
6067
$(Q)cp -a $< $@ 2> /dev/null
6168

62-
HTML_DEPS += doc/favicon.inc
63-
doc/favicon.inc: $(D)/favicon.inc | doc/
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/
6475
@$(call E, cp: $@)
6576
$(Q)cp -a $< $@ 2> /dev/null
6677

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

8596
DOCS += doc/rust.tex
86-
doc/rust.tex: $(D)/rust.md doc/version.md | doc/
97+
doc/rust.tex: $(D)/rust.md doc/footer.tex doc/version.md | doc/
8798
@$(call E, pandoc: $@)
8899
$(Q)$(CFG_NODE) $(D)/prep.js $< | \
89100
$(CFG_PANDOC) $(TEX_OPTS) --output=$@
@@ -107,7 +118,7 @@ doc/tutorial.html: $(D)/tutorial.md $(HTML_DEPS)
107118
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
108119

109120
DOCS += doc/tutorial.tex
110-
doc/tutorial.tex: $(D)/tutorial.md doc/version.md
121+
doc/tutorial.tex: $(D)/tutorial.md doc/footer.tex doc/version.md
111122
@$(call E, pandoc: $@)
112123
$(Q)$(CFG_NODE) $(D)/prep.js $< | \
113124
$(CFG_PANDOC) $(TEX_OPTS) --output=$@
@@ -149,12 +160,6 @@ doc/complement-project-faq.html: $(D)/complement-project-faq.md $(HTML_DEPS)
149160
$(Q)$(CFG_NODE) $(D)/prep.js --highlight $< | \
150161
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
151162

152-
DOCS += doc/complement-usage-faq.html
153-
doc/complement-usage-faq.html: $(D)/complement-usage-faq.md $(HTML_DEPS)
154-
@$(call E, pandoc: $@)
155-
$(Q)$(CFG_NODE) $(D)/prep.js --highlight $< | \
156-
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
157-
158163
DOCS += doc/complement-cheatsheet.html
159164
doc/complement-cheatsheet.html: $(D)/complement-cheatsheet.md doc/full-toc.inc $(HTML_DEPS)
160165
@$(call E, pandoc: $@)

branches/try2/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ CFG_PATH_MUNGE_arm-linux-androideabi := true
300300
CFG_LDPATH_arm-linux-androideabi :=
301301
CFG_RUN_arm-linux-androideabi=
302302
CFG_RUN_TARG_arm-linux-androideabi=
303-
RUSTC_FLAGS_arm-linux-androideabi :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
304-
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
303+
RUSTC_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
304+
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
305305

306306
# arm-unknown-linux-gnueabihf configuration
307307
CROSS_PREFIX_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-

branches/try2/mk/target.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7474
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
7575
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
7676
| $$(TLIB$(1)_T_$(2)_H_$(3))/
77-
@$$(call E, compile_and_link: $$(@D)/lib$(4))
77+
@$$(call E, oxidize: $$(@D)/lib$(4))
7878
$$(call REMOVE_ALL_OLD_GLOB_MATCHES,\
7979
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
8080
$$(call REMOVE_ALL_OLD_GLOB_MATCHES,\
@@ -113,7 +113,7 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
113113
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
114114
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
115115
| $$(TBIN$(1)_T_$(4)_H_$(3))/
116-
@$$(call E, compile_and_link: $$@)
116+
@$$(call E, oxidize: $$@)
117117
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --cfg $(4)
118118

119119
endef

branches/try2/mk/tests.mk

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,11 @@ endif
116116

117117
# Run the compiletest runner itself under valgrind
118118
ifdef CTEST_VALGRIND
119-
CFG_RUN_CTEST_$(1)=$$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(2),$$(3))
119+
CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
120+
$$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(2),$$(3))
120121
else
121-
CFG_RUN_CTEST_$(1)=$$(call CFG_RUN_$$(CFG_BUILD),$$(TLIB$$(1)_T_$$(3)_H_$$(3)),$$(2))
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))
122124
endif
123125

124126
endef
@@ -242,7 +244,6 @@ ALL_HS := $(filter-out $(S)src/rt/vg/valgrind.h \
242244
tidy:
243245
@$(call E, check: formatting)
244246
$(Q)find $(S)src -name '*.r[sc]' \
245-
| grep '^$(S)src/test' -v \
246247
| grep '^$(S)src/libuv' -v \
247248
| grep '^$(S)src/llvm' -v \
248249
| grep '^$(S)src/gyp' -v \
@@ -346,7 +347,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
346347
$$(CRATEFILE_$(4)) \
347348
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
348349
$$(STDTESTDEP_$(1)_$(2)_$(3)_$(4))
349-
@$$(call E, compile_and_link: $$@)
350+
@$$(call E, oxidize: $$@)
350351
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
351352
-L "$$(RT_OUTPUT_DIR_$(2))" \
352353
-L "$$(LLVM_LIBDIR_$(2))"
@@ -529,7 +530,7 @@ CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
529530

530531
# There's no need our entire test suite to take up gigabytes of space on disk
531532
# including copies of libstd/libextra all over the place
532-
CTEST_RUSTC_FLAGS := $$(CTEST_RUSTC_FLAGS) -Z prefer-dynamic
533+
CTEST_RUSTC_FLAGS := $$(CTEST_RUSTC_FLAGS) -C prefer-dynamic
533534

534535
# The tests can not be optimized while the rest of the compiler is optimized, so
535536
# filter out the optimization (if any) from rustc and then figure out if we need
@@ -834,15 +835,15 @@ define DEF_CHECK_FAST_FOR_T_H
834835
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB): \
835836
tmp/$$(FT).rc \
836837
$$(SREQ2_T_$(2)_H_$(3))
837-
@$$(call E, compile_and_link: $$@)
838+
@$$(call E, oxidize: $$@)
838839
$$(STAGE2_T_$(2)_H_$(3)) --crate-type=dylib --out-dir $$(@D) $$< \
839840
-L "$$(RT_OUTPUT_DIR_$(2))"
840841

841842
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)): \
842843
tmp/$$(FT_DRIVER).rs \
843844
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB) \
844845
$$(SREQ2_T_$(2)_H_$(3))
845-
@$$(call E, compile_and_link: $$@ $$<)
846+
@$$(call E, oxidize: $$@ $$<)
846847
$$(STAGE2_T_$(2)_H_$(3)) -o $$@ $$< \
847848
-L "$$(RT_OUTPUT_DIR_$(2))"
848849

0 commit comments

Comments
 (0)