Skip to content

Commit c4be5dc

Browse files
committed
---
yaml --- r: 104178 b: refs/heads/try c: 804955f h: refs/heads/master v: v3
1 parent a23cc32 commit c4be5dc

File tree

278 files changed

+5307
-6090
lines changed

Some content is hidden

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

278 files changed

+5307
-6090
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: 18477ac68a3daf8260be17be368f59a65c3b7527
5+
refs/heads/try: 804955f79a372b2f033b479720a7d72b6d77c48f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/Makefile.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ ifdef TRACE
125125
CFG_RUSTC_FLAGS += -Z trace
126126
endif
127127
ifdef CFG_DISABLE_RPATH
128-
CFG_RUSTC_FLAGS += -C no-rpath
128+
# 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
129132
endif
130133

131134
# The executables crated during this compilation process have no need to include
@@ -137,7 +140,8 @@ endif
137140
# snapshot will be generated with a statically linked rustc so we only have to
138141
# worry about the distribution of one file (with its native dynamic
139142
# dependencies)
140-
RUSTFLAGS_STAGE0 += -C prefer-dynamic
143+
#
144+
# NOTE: after a snapshot (stage0), put this on stage0 as well
141145
RUSTFLAGS_STAGE1 += -C prefer-dynamic
142146

143147
# platform-specific auto-configuration

branches/try/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ TOOLS := compiletest rustdoc rustc
5757

5858
DEPS_std := native:rustrt native:compiler-rt
5959
DEPS_extra := std term sync serialize getopts collections
60-
DEPS_green := std native:context_switch
60+
DEPS_green := std
6161
DEPS_rustuv := std native:uv native:uv_support
6262
DEPS_native := std
6363
DEPS_syntax := std extra term serialize collections

branches/try/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PKG_ICO = $(S)src/etc/pkg/rust-logo.ico
1212
PKG_EXE = $(PKG_DIR)-install.exe
1313
endif
1414

15-
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp $(S)src/compiler-rt
15+
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp
1616

1717
PKG_FILES := \
1818
$(S)COPYRIGHT \

branches/try/mk/platform.mk

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ CFG_GCCISH_DEF_FLAG_arm-apple-darwin := -Wl,-exported_symbols_list,
208208
CFG_GCCISH_PRE_LIB_FLAGS_arm-apple-darwin :=
209209
CFG_GCCISH_POST_LIB_FLAGS_arm-apple-darwin :=
210210
CFG_DEF_SUFFIX_arm-apple-darwin := .darwin.def
211-
CFG_LLC_FLAGS_arm-apple-darwin := -arm-enable-ehabi -arm-enable-ehabi-descriptors
211+
CFG_LLC_FLAGS_arm-apple-darwin :=
212212
CFG_INSTALL_NAME_arm-apple-darwin = -Wl,-install_name,@rpath/$(1)
213213
CFG_LIBUV_LINK_FLAGS_arm-apple-darwin =
214214
CFG_EXE_SUFFIX_arm-apple-darwin :=
@@ -290,7 +290,7 @@ CFG_GCCISH_DEF_FLAG_arm-linux-androideabi := -Wl,--export-dynamic,--dynamic-list
290290
CFG_GCCISH_PRE_LIB_FLAGS_arm-linux-androideabi := -Wl,-whole-archive
291291
CFG_GCCISH_POST_LIB_FLAGS_arm-linux-androideabi := -Wl,-no-whole-archive
292292
CFG_DEF_SUFFIX_arm-linux-androideabi := .android.def
293-
CFG_LLC_FLAGS_arm-linux-androideabi := -arm-enable-ehabi -arm-enable-ehabi-descriptors
293+
CFG_LLC_FLAGS_arm-linux-androideabi :=
294294
CFG_INSTALL_NAME_arm-linux-androideabi =
295295
CFG_LIBUV_LINK_FLAGS_arm-linux-androideabi =
296296
CFG_EXE_SUFFIX_arm-linux-androideabi :=
@@ -300,7 +300,7 @@ 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 :=
303+
RUSTC_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
304304
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
305305

306306
# arm-unknown-linux-gnueabihf configuration
@@ -320,7 +320,7 @@ CFG_GCCISH_DEF_FLAG_arm-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynami
320320
CFG_GCCISH_PRE_LIB_FLAGS_arm-unknown-linux-gnueabihf := -Wl,-whole-archive
321321
CFG_GCCISH_POST_LIB_FLAGS_arm-unknown-linux-gnueabihf := -Wl,-no-whole-archive
322322
CFG_DEF_SUFFIX_arm-unknown-linux-gnueabihf := .linux.def
323-
CFG_LLC_FLAGS_arm-unknown-linux-gnueabihf := -arm-enable-ehabi -arm-enable-ehabi-descriptors
323+
CFG_LLC_FLAGS_arm-unknown-linux-gnueabihf :=
324324
CFG_INSTALL_NAME_ar,-unknown-linux-gnueabihf =
325325
CFG_LIBUV_LINK_FLAGS_arm-unknown-linux-gnueabihf =
326326
CFG_EXE_SUFFIX_arm-unknown-linux-gnueabihf :=
@@ -331,7 +331,7 @@ CFG_LDPATH_arm-unknown-linux-gnueabihf :=
331331
CFG_RUN_arm-unknown-linux-gnueabihf=$(2)
332332
CFG_RUN_TARG_arm-unknown-linux-gnueabihf=$(call CFG_RUN_arm-unknown-linux-gnueabihf,,$(2))
333333
RUSTC_FLAGS_arm-unknown-linux-gnueabihf :=
334-
RUSTC_CROSS_FLAGS_arm-unknown-linux-gnueabihf :=
334+
RUSTC_CROSS_FLAGS_arm-unknown-linux-gnueabihf := --linker=$(CROSS_PREFIX_arm-unknown-linux-gnueabihf)$(CXX_arm-unknown-linux-gnueabihf)
335335

336336
# arm-unknown-linux-gnueabi configuration
337337
CROSS_PREFIX_arm-unknown-linux-gnueabi=arm-linux-gnueabi-
@@ -343,7 +343,7 @@ CFG_LIB_NAME_arm-unknown-linux-gnueabi=lib$(1).so
343343
CFG_STATIC_LIB_NAME_arm-unknown-linux-gnueabi=lib$(1).a
344344
CFG_LIB_GLOB_arm-unknown-linux-gnueabi=lib$(1)-*.so
345345
CFG_LIB_DSYM_GLOB_arm-unknown-linux-gnueabi=lib$(1)-*.dylib.dSYM
346-
CFG_GCCISH_CFLAGS_arm-unknown-linux-gnueabi := -Wall -g -fPIC -D__arm__ -mfpu=vfp
346+
CFG_GCCISH_CFLAGS_arm-unknown-linux-gnueabi := -Wall -g -fPIC -D__arm__
347347
CFG_GCCISH_CXXFLAGS_arm-unknown-linux-gnueabi := -fno-rtti
348348
CFG_GCCISH_LINK_FLAGS_arm-unknown-linux-gnueabi := -shared -fPIC -g
349349
CFG_GCCISH_DEF_FLAG_arm-unknown-linux-gnueabi := -Wl,--export-dynamic,--dynamic-list=
@@ -361,7 +361,7 @@ CFG_LDPATH_arm-unknown-linux-gnueabi :=
361361
CFG_RUN_arm-unknown-linux-gnueabi=$(2)
362362
CFG_RUN_TARG_arm-unknown-linux-gnueabi=$(call CFG_RUN_arm-unknown-linux-gnueabi,,$(2))
363363
RUSTC_FLAGS_arm-unknown-linux-gnueabi :=
364-
RUSTC_CROSS_FLAGS_arm-unknown-linux-gnueabi :=
364+
RUSTC_CROSS_FLAGS_arm-unknown-linux-gnueabi := --linker=$(CROSS_PREFIX_arm-unknown-linux-gnueabi)$(CXX_arm-unknown-linux-gnueabi)
365365

366366
# mips-unknown-linux-gnu configuration
367367
CC_mips-unknown-linux-gnu=mips-linux-gnu-gcc
@@ -389,7 +389,7 @@ CFG_PATH_MUNGE_mips-unknown-linux-gnu := true
389389
CFG_LDPATH_mips-unknown-linux-gnu :=
390390
CFG_RUN_mips-unknown-linux-gnu=
391391
CFG_RUN_TARG_mips-unknown-linux-gnu=
392-
RUSTC_FLAGS_mips-unknown-linux-gnu := -C target-cpu=mips32r2 -C target-feature="+mips32r2,+o32" -C soft-float
392+
RUSTC_FLAGS_mips-unknown-linux-gnu := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32 -Z soft-float
393393

394394
# i686-pc-mingw32 configuration
395395
CC_i686-pc-mingw32=$(CC)
@@ -475,7 +475,7 @@ CFG_PATH_MUNGE_i686-w64-mingw32 :=
475475
CFG_LDPATH_i686-w64-mingw32 :=$(CFG_LDPATH_i686-w64-mingw32):$(PATH)
476476
CFG_RUN_i686-w64-mingw32=PATH="$(CFG_LDPATH_i686-w64-mingw32):$(1)" $(2)
477477
CFG_RUN_TARG_i686-w64-mingw32=$(call CFG_RUN_i686-w64-mingw32,$(HLIB$(1)_H_$(CFG_BUILD)),$(2))
478-
RUSTC_CROSS_FLAGS_i686-w64-mingw32 :=
478+
RUSTC_CROSS_FLAGS_i686-w64-mingw32 := --linker=$(CROSS_PREFIX_i686-w64-mingw32)$(CXX_i686-w64-mingw32)
479479

480480
# x86_64-w64-mingw32 configuration
481481
CROSS_PREFIX_x86_64-w64-mingw32=x86_64-w64-mingw32-
@@ -504,7 +504,7 @@ CFG_PATH_MUNGE_x86_64-w64-mingw32 :=
504504
CFG_LDPATH_x86_64-w64-mingw32 :=$(CFG_LDPATH_x86_64-w64-mingw32):$(PATH)
505505
CFG_RUN_x86_64-w64-mingw32=PATH="$(CFG_LDPATH_x86_64-w64-mingw32):$(1)" $(2)
506506
CFG_RUN_TARG_x86_64-w64-mingw32=$(call CFG_RUN_x86_64-w64-mingw32,$(HLIB$(1)_H_$(CFG_BUILD)),$(2))
507-
RUSTC_CROSS_FLAGS_x86_64-w64-mingw32 :=
507+
RUSTC_CROSS_FLAGS_x86_64-w64-mingw32 := --linker=$(CROSS_PREFIX_x86_64-w64-mingw32)$(CXX_x86_64-w64-mingw32)
508508

509509
# x86_64-unknown-freebsd configuration
510510
CC_x86_64-unknown-freebsd=$(CC)
@@ -549,9 +549,8 @@ define CFG_MAKE_TOOLCHAIN
549549
CXX_$(1)=$(CROSS_PREFIX_$(1))$(CXX_$(1))
550550
CPP_$(1)=$(CROSS_PREFIX_$(1))$(CPP_$(1))
551551
AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1))
552-
RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(CXX_$(1)) -C ar=$$(AR_$(1)) $(RUSTC_CROSS_FLAGS_$(1))
553552

554-
RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1))
553+
RUSTC_FLAGS_$(1)=$(RUSTC_CROSS_FLAGS_$(1))
555554
endif
556555

557556
CFG_COMPILE_C_$(1) = $$(CC_$(1)) \

branches/try/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 := rustrt sundown uv_support morestack miniz context_switch
38+
NATIVE_LIBS := rustrt sundown uv_support morestack miniz
3939

4040
# $(1) is the target triple
4141
define NATIVE_LIBRARIES
@@ -54,10 +54,9 @@ NATIVE_DEPS_rustrt_$(1) := rust_builtin.c \
5454
rust_android_dummy.c \
5555
rust_test_helpers.c \
5656
rust_try.ll \
57+
arch/$$(HOST_$(1))/_context.S \
5758
arch/$$(HOST_$(1))/record_sp.S
5859
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
59-
NATIVE_DEPS_context_switch_$(1) := \
60-
arch/$$(HOST_$(1))/_context.S
6160

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

branches/try/mk/tests.mk

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -333,22 +333,21 @@ $(foreach host,$(CFG_HOST), \
333333

334334
define TEST_RUNNER
335335

336-
# If NO_REBUILD is set then break the dependencies on everything but
337-
# the source files so we can test crates without rebuilding any of the
338-
# parent crates.
336+
# If NO_REBUILD is set then break the dependencies on extra so we can
337+
# test crates without rebuilding std and extra first
339338
ifeq ($(NO_REBUILD),)
340-
TESTDEP_$(1)_$(2)_$(3)_$(4) = $$(SREQ$(1)_T_$(2)_H_$(3)) \
339+
STDTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(SREQ$(1)_T_$(2)_H_$(3)) \
341340
$$(foreach crate,$$(TARGET_CRATES),\
342-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)) \
343-
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4))
341+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate))
344342
else
345-
TESTDEP_$(1)_$(2)_$(3)_$(4) = $$(RSINPUTS_$(4))
343+
STDTESTDEP_$(1)_$(2)_$(3)_$(4) =
346344
endif
347345

348346
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): CFG_COMPILER = $(2)
349347
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
350-
$$(CRATEFILE_$(4)) \
351-
$$(TESTDEP_$(1)_$(2)_$(3)_$(4))
348+
$$(CRATEFILE_$(4)) \
349+
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
350+
$$(STDTESTDEP_$(1)_$(2)_$(3)_$(4))
352351
@$$(call E, oxidize: $$@)
353352
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
354353
-L "$$(RT_OUTPUT_DIR_$(2))" \
@@ -554,8 +553,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
554553
--host $(3) \
555554
--adb-path=$(CFG_ADB) \
556555
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
557-
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
558-
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
556+
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
559557
$$(CTEST_TESTARGS)
560558

561559
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
@@ -686,22 +684,13 @@ $(foreach host,$(CFG_HOST), \
686684

687685
define DEF_CRATE_DOC_TEST
688686

689-
# If NO_REBUILD is set then break the dependencies on everything but
690-
# the source files so we can test crate documentation without
691-
# rebuilding any of the parent crates.
692-
ifeq ($(NO_REBUILD),)
693-
DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = \
694-
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
695-
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
696-
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3))
697-
else
698-
DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(RSINPUTS_$(4))
699-
endif
700-
701687
check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4))
702688

703689
ifeq ($(2),$$(CFG_BUILD))
704-
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
690+
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): \
691+
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
692+
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
693+
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3))
705694
@$$(call E, run doc-$(4) [$(2)])
706695
$$(Q)$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) --test \
707696
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@

branches/try/src/compiletest/common.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,8 @@ pub struct config {
7777
// for running under valgrind
7878
runtool: Option<~str>,
7979

80-
// Flags to pass to the compiler when building for the host
81-
host_rustcflags: Option<~str>,
82-
83-
// Flags to pass to the compiler when building for the target
84-
target_rustcflags: Option<~str>,
80+
// Flags to pass to the compiler
81+
rustcflags: Option<~str>,
8582

8683
// Run tests using the JIT
8784
jit: bool,

branches/try/src/compiletest/compiletest.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ pub fn parse_config(args: ~[~str]) -> config {
6464
optflag("", "ignored", "run tests marked as ignored"),
6565
optopt("", "runtool", "supervisor program to run tests under \
6666
(eg. emulator, valgrind)", "PROGRAM"),
67-
optopt("", "host-rustcflags", "flags to pass to rustc for host", "FLAGS"),
68-
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
67+
optopt("", "rustcflags", "flags to pass to rustc", "FLAGS"),
6968
optflag("", "verbose", "run tests verbosely, showing all output"),
7069
optopt("", "logfile", "file to log test execution to", "FILE"),
7170
optopt("", "save-metrics", "file to save metrics to", "FILE"),
@@ -133,8 +132,7 @@ pub fn parse_config(args: ~[~str]) -> config {
133132
ratchet_noise_percent:
134133
matches.opt_str("ratchet-noise-percent").and_then(|s| from_str::<f64>(s)),
135134
runtool: matches.opt_str("runtool"),
136-
host_rustcflags: matches.opt_str("host-rustcflags"),
137-
target_rustcflags: matches.opt_str("target-rustcflags"),
135+
rustcflags: matches.opt_str("rustcflags"),
138136
jit: matches.opt_present("jit"),
139137
target: opt_str2(matches.opt_str("target")).to_str(),
140138
host: opt_str2(matches.opt_str("host")).to_str(),
@@ -163,8 +161,7 @@ pub fn log_config(config: &config) {
163161
logv(c, format!("run_ignored: {}", config.run_ignored));
164162
logv(c, format!("filter: {}", opt_str(&config.filter)));
165163
logv(c, format!("runtool: {}", opt_str(&config.runtool)));
166-
logv(c, format!("host-rustcflags: {}", opt_str(&config.host_rustcflags)));
167-
logv(c, format!("target-rustcflags: {}", opt_str(&config.target_rustcflags)));
164+
logv(c, format!("rustcflags: {}", opt_str(&config.rustcflags)));
168165
logv(c, format!("jit: {}", config.jit));
169166
logv(c, format!("target: {}", config.target));
170167
logv(c, format!("host: {}", config.host));
@@ -222,14 +219,12 @@ pub fn run_tests(config: &config) {
222219
mode_debug_info => {
223220
println!("arm-linux-androideabi debug-info \
224221
test uses tcp 5039 port. please reserve it");
222+
//arm-linux-androideabi debug-info test uses remote debugger
223+
//so, we test 1 task at once
224+
os::setenv("RUST_TEST_TASKS","1");
225225
}
226226
_ =>{}
227227
}
228-
229-
//arm-linux-androideabi debug-info test uses remote debugger
230-
//so, we test 1 task at once.
231-
// also trying to isolate problems with adb_run_wrapper.sh ilooping
232-
os::setenv("RUST_TEST_TASKS","1");
233228
}
234229

235230
let opts = test_opts(config);

branches/try/src/compiletest/header.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ pub fn is_test_ignored(config: &config, testfile: &Path) -> bool {
108108
else if parse_name_directive(ln, ignore_stage(config)) { false }
109109
else if config.mode == common::mode_pretty &&
110110
parse_name_directive(ln, "ignore-pretty") { false }
111-
else if config.target != config.host &&
112-
parse_name_directive(ln, "ignore-cross-compile") { false }
113111
else { true }
114112
});
115113

branches/try/src/compiletest/runtest.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ actual:\n\
250250
~"-L", config.build_base.as_str().unwrap().to_owned(),
251251
~"-L",
252252
aux_dir.as_str().unwrap().to_owned()];
253-
args.push_all_move(split_maybe_args(&config.target_rustcflags));
253+
args.push_all_move(split_maybe_args(&config.rustcflags));
254254
args.push_all_move(split_maybe_args(&props.compile_flags));
255255
// FIXME (#9639): This needs to handle non-utf8 paths
256256
return ProcArgs {prog: config.rustc_path.as_str().unwrap().to_owned(), args: args};
@@ -260,9 +260,9 @@ actual:\n\
260260
fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
261261

262262
// do not optimize debuginfo tests
263-
let mut config = match config.target_rustcflags {
263+
let mut config = match config.rustcflags {
264264
Some(ref flags) => config {
265-
target_rustcflags: Some(flags.replace("-O", "")),
265+
rustcflags: Some(flags.replace("-O", "")),
266266
.. (*config).clone()
267267
},
268268
None => (*config).clone()
@@ -329,7 +329,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
329329
break;
330330
}
331331

332-
let args = split_maybe_args(&config.target_rustcflags);
332+
let args = split_maybe_args(&config.rustcflags);
333333
let mut tool_path:~str = ~"";
334334
for arg in args.iter() {
335335
if arg.contains("android-cross-path=") {
@@ -770,11 +770,7 @@ fn make_compile_args(config: &config,
770770
ThisDirectory(path) => { args.push(~"--out-dir"); path }
771771
};
772772
args.push(path.as_str().unwrap().to_owned());
773-
if props.force_host {
774-
args.push_all_move(split_maybe_args(&config.host_rustcflags));
775-
} else {
776-
args.push_all_move(split_maybe_args(&config.target_rustcflags));
777-
}
773+
args.push_all_move(split_maybe_args(&config.rustcflags));
778774
args.push_all_move(split_maybe_args(&props.compile_flags));
779775
return ProcArgs {prog: config.rustc_path.as_str().unwrap().to_owned(), args: args};
780776
}

branches/try/src/doc/complement-cheatsheet.md

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -36,42 +36,12 @@ let y: ~str = x.to_str_radix(16);
3636
Use [`FromStrRadix`](http://static.rust-lang.org/doc/master/std/num/trait.FromStrRadix.html), and its helper function, [`from_str_radix`](http://static.rust-lang.org/doc/master/std/num/fn.from_str_radix.html).
3737

3838
~~~
39-
use std::num;
39+
use std::num::from_str_radix;
4040
41-
let x: Option<i64> = num::from_str_radix("deadbeef", 16);
41+
let x: Option<i64> = from_str_radix("deadbeef", 16);
4242
let y: i64 = x.unwrap();
4343
~~~
4444

45-
**Vector of Bytes to String**
46-
47-
To return a Borrowed String Slice (&str) use the str helper function [`from_utf8`](http://static.rust-lang.org/doc/master/std/str/fn.from_utf8.html).
48-
49-
~~~
50-
use std::str;
51-
52-
let bytes = ~[104u8,105u8];
53-
let x: Option<&str> = str::from_utf8(bytes);
54-
let y: &str = x.unwrap();
55-
~~~
56-
57-
To return an Owned String (~str) use the str helper function [`from_utf8_owned`](http://static.rust-lang.org/doc/master/std/str/fn.from_utf8_owned.html).
58-
59-
~~~
60-
use std::str;
61-
62-
let x: Option<~str> = str::from_utf8_owned(~[104u8,105u8]);
63-
let y: ~str = x.unwrap();
64-
~~~~
65-
66-
To return a [`MaybeOwned`](http://static.rust-lang.org/doc/master/std/str/enum.MaybeOwned.html) use the str helper function [`from_utf8_lossy`](http://static.rust-lang.org/doc/master/std/str/fn.from_utf8_owned.html). This function also replaces non-valid utf-8 sequences with U+FFFD replacement character.
67-
68-
~~~
69-
use std::str;
70-
71-
let x = bytes!(72u8,"ello ",0xF0,0x90,0x80,"World!");
72-
let y = str::from_utf8_lossy(x);
73-
~~~~
74-
7545
# File operations
7646

7747
## How do I read from a file?

0 commit comments

Comments
 (0)