Skip to content

Commit 433793c

Browse files
committed
---
yaml --- r: 149066 b: refs/heads/try2 c: 31576c7 h: refs/heads/master v: v3
1 parent 3333237 commit 433793c

File tree

618 files changed

+2861
-6619
lines changed

Some content is hidden

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

618 files changed

+2861
-6619
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: 1f245cc7ea72bc8eeddd12cc9f8e753f3ca71910
8+
refs/heads/try2: 31576c7ef0988b2b4c6133c2dfc95b446237a5da
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/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 += -C no-rpath
130-
RUSTFLAGS_STAGE2 += -C no-rpath
131-
RUSTFLAGS_STAGE3 += -C no-rpath
129+
RUSTFLAGS_STAGE1 += --no-rpath
130+
RUSTFLAGS_STAGE2 += --no-rpath
131+
RUSTFLAGS_STAGE3 += --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 += -C prefer-dynamic
144+
RUSTFLAGS_STAGE1 += -Z prefer-dynamic
145145

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

branches/try2/man/rustc.1

Lines changed: 22 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,18 @@ 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
3036
\fB\-\-ls\fR
3137
List the symbols defined by a library crate
3238
.TP
3339
\fB\-\-no\-trans\fR
3440
Run all passes except translation; no output
3541
.TP
36-
\fB\-g\fR, \fB\-\-debuginfo\fR
37-
Emit DWARF debug information into object files generated.
38-
.TP
3942
\fB\-O\fR
4043
Equivalent to \fI\-\-opt\-level=2\fR
4144
.TP
@@ -45,6 +48,11 @@ Write output to <filename>. Ignored if more than one --emit is specified.
4548
\fB\-\-opt\-level\fR LEVEL
4649
Optimize with possible levels 0-3
4750
.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
4856
\fB\-\-out\-dir\fR DIR
4957
Write output to compiler-chosen filename in <dir>. Ignored if -o is specified.
5058
(default the current directory)
@@ -58,6 +66,9 @@ Pretty-print the input instead of compiling; valid types are: normal
5866
expanded, with type annotations), or identified (fully parenthesized,
5967
AST nodes and blocks with IDs)
6068
.TP
69+
\fB\-\-save\-temps\fR
70+
Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
71+
.TP
6172
\fB\-\-sysroot\fR PATH
6273
Override the system root
6374
.TP
@@ -69,6 +80,12 @@ Target triple cpu-manufacturer-kernel[-os] to compile for (see
6980
http://sources.redhat.com/autobook/autobook/autobook_17.html
7081
for details)
7182
.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
7289
\fB\-W\fR help
7390
Print 'lint' options and default settings
7491
.TP
@@ -87,80 +104,9 @@ Set lint forbidden
87104
\fB\-Z\fR FLAG
88105
Set internal debugging options. Use "-Z help" to print available options.
89106
.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
94107
\fB\-v\fR, \fB\-\-version\fR
95108
Print version info and exit
96109

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-
164110
.SH "EXAMPLES"
165111
To build an executable from a source file with a main function:
166112
$ rustc -o hello hello.rs
@@ -171,8 +117,8 @@ To build a library from a source file:
171117
To build either with a crate (.rs) file:
172118
$ rustc hello.rs
173119

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

177123
.SH "SEE ALSO"
178124

branches/try2/mk/crates.mk

Lines changed: 1 addition & 2 deletions
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 fourcc
53+
uuid serialize sync getopts collections
5454
HOST_CRATES := syntax rustc rustdoc
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
@@ -74,7 +74,6 @@ DEPS_uuid := std serialize
7474
DEPS_sync := std
7575
DEPS_getopts := std
7676
DEPS_collections := std serialize
77-
DEPS_fourcc := syntax std
7877

7978
TOOL_DEPS_compiletest := extra green rustuv getopts
8079
TOOL_DEPS_rustdoc := rustdoc green rustuv

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: 12 additions & 17 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,6 +149,12 @@ 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

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+
163158
DOCS += doc/complement-cheatsheet.html
164159
doc/complement-cheatsheet.html: $(D)/complement-cheatsheet.md doc/full-toc.inc $(HTML_DEPS)
165160
@$(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 :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
304-
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
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)
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, oxidize: $$(@D)/lib$(4))
77+
@$$(call E, compile_and_link: $$(@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, oxidize: $$@)
116+
@$$(call E, compile_and_link: $$@)
117117
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --cfg $(4)
118118

119119
endef

branches/try2/mk/tests.mk

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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 \
@@ -347,7 +346,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
347346
$$(CRATEFILE_$(4)) \
348347
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
349348
$$(STDTESTDEP_$(1)_$(2)_$(3)_$(4))
350-
@$$(call E, oxidize: $$@)
349+
@$$(call E, compile_and_link: $$@)
351350
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
352351
-L "$$(RT_OUTPUT_DIR_$(2))" \
353352
-L "$$(LLVM_LIBDIR_$(2))"
@@ -530,7 +529,7 @@ CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
530529

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

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

842841
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)): \
843842
tmp/$$(FT_DRIVER).rs \
844843
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB) \
845844
$$(SREQ2_T_$(2)_H_$(3))
846-
@$$(call E, oxidize: $$@ $$<)
845+
@$$(call E, compile_and_link: $$@ $$<)
847846
$$(STAGE2_T_$(2)_H_$(3)) -o $$@ $$< \
848847
-L "$$(RT_OUTPUT_DIR_$(2))"
849848

0 commit comments

Comments
 (0)