Skip to content

Commit 8bcb07c

Browse files
committed
---
yaml --- r: 101670 b: refs/heads/master c: 071ee96 h: refs/heads/master v: v3
1 parent 63eaff2 commit 8bcb07c

File tree

149 files changed

+585
-617
lines changed

Some content is hidden

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

149 files changed

+585
-617
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: f3a87a7f1ff8089742bc8dc45b812dd844109034
2+
refs/heads/master: 071ee96277845af99bde5e7e15ccbb0cff9be0a7
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff

trunk/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

trunk/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

trunk/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-

trunk/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

trunk/mk/tests.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
347347
$$(CRATEFILE_$(4)) \
348348
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
349349
$$(STDTESTDEP_$(1)_$(2)_$(3)_$(4))
350-
@$$(call E, oxidize: $$@)
350+
@$$(call E, compile_and_link: $$@)
351351
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
352352
-L "$$(RT_OUTPUT_DIR_$(2))" \
353353
-L "$$(LLVM_LIBDIR_$(2))"
@@ -530,7 +530,7 @@ CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
530530

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

535535
# The tests can not be optimized while the rest of the compiler is optimized, so
536536
# filter out the optimization (if any) from rustc and then figure out if we need
@@ -835,15 +835,15 @@ define DEF_CHECK_FAST_FOR_T_H
835835
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB): \
836836
tmp/$$(FT).rc \
837837
$$(SREQ2_T_$(2)_H_$(3))
838-
@$$(call E, oxidize: $$@)
838+
@$$(call E, compile_and_link: $$@)
839839
$$(STAGE2_T_$(2)_H_$(3)) --crate-type=dylib --out-dir $$(@D) $$< \
840840
-L "$$(RT_OUTPUT_DIR_$(2))"
841841

842842
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)): \
843843
tmp/$$(FT_DRIVER).rs \
844844
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB) \
845845
$$(SREQ2_T_$(2)_H_$(3))
846-
@$$(call E, oxidize: $$@ $$<)
846+
@$$(call E, compile_and_link: $$@ $$<)
847847
$$(STAGE2_T_$(2)_H_$(3)) -o $$@ $$< \
848848
-L "$$(RT_OUTPUT_DIR_$(2))"
849849

trunk/src/compiletest/runtest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
332332
let args = split_maybe_args(&config.rustcflags);
333333
let mut tool_path:~str = ~"";
334334
for arg in args.iter() {
335-
if arg.contains("--android-cross-path=") {
336-
tool_path = arg.replace("--android-cross-path=","");
335+
if arg.contains("android-cross-path=") {
336+
tool_path = arg.replace("android-cross-path=","");
337337
break;
338338
}
339339
}
@@ -1054,7 +1054,7 @@ fn compile_test_and_save_bitcode(config: &config, props: &TestProps,
10541054
let aux_dir = aux_output_dir_name(config, testfile);
10551055
// FIXME (#9639): This needs to handle non-utf8 paths
10561056
let link_args = ~[~"-L", aux_dir.as_str().unwrap().to_owned()];
1057-
let llvm_args = ~[~"--emit=obj", ~"--crate-type=lib", ~"--save-temps"];
1057+
let llvm_args = ~[~"--emit=obj", ~"--crate-type=lib", ~"-C", ~"save-temps"];
10581058
let args = make_compile_args(config, props,
10591059
link_args + llvm_args,
10601060
|a, b| ThisFile(make_o_name(a, b)), testfile);

trunk/src/doc/guide-ffi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ and `free`:
176176
~~~~
177177
use std::cast;
178178
use std::libc::{c_void, size_t, malloc, free};
179-
use std::mem;
180179
use std::ptr;
180+
use std::unstable::intrinsics;
181181
182182
// Define a wrapper around the handle returned by the foreign code.
183183
// Unique<T> has the same semantics as ~T
@@ -199,7 +199,7 @@ impl<T: Send> Unique<T> {
199199
// `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it
200200
// move_val_init moves a value into this memory without
201201
// attempting to drop the original value.
202-
mem::move_val_init(&mut *ptr, value);
202+
intrinsics::move_val_init(&mut *ptr, value);
203203
Unique{ptr: ptr}
204204
}
205205
}
@@ -226,7 +226,7 @@ impl<T: Send> Unique<T> {
226226
impl<T: Send> Drop for Unique<T> {
227227
fn drop(&mut self) {
228228
unsafe {
229-
let x = mem::uninit(); // dummy value to swap in
229+
let x = intrinsics::uninit(); // dummy value to swap in
230230
// We need to move the object out of the box, so that
231231
// the destructor is called (at the end of this scope.)
232232
ptr::replace_ptr(self.ptr, x);

trunk/src/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3761,7 +3761,7 @@ dependencies will be used:
37613761
with the above limitations in dynamic and static libraries, it is required
37623762
for all upstream dependencies to be in the same format. The next question is
37633763
whether to prefer a dynamic or a static format. The compiler currently favors
3764-
static linking over dynamic linking, but this can be inverted with the `-Z
3764+
static linking over dynamic linking, but this can be inverted with the `-C
37653765
prefer-dynamic` flag to the compiler.
37663766

37673767
What this means is that first the compiler will attempt to find all upstream

0 commit comments

Comments
 (0)