Skip to content

Commit a26855a

Browse files
committed
---
yaml --- r: 149198 b: refs/heads/try2 c: 3c02749 h: refs/heads/master v: v3
1 parent fc9da41 commit a26855a

File tree

134 files changed

+2912
-2486
lines changed

Some content is hidden

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

134 files changed

+2912
-2486
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: d40b5374055086df88727925872f0733843f9d2e
8+
refs/heads/try2: 3c02749ad873af24c5865e105bd1e6ded1b71409
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/mk/platform.mk

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -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/try2/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/try2/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
554554
--host $(3) \
555555
--adb-path=$(CFG_ADB) \
556556
--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))" \
557+
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
559558
$$(CTEST_TESTARGS)
560559

561560
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)

branches/try2/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/try2/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/try2/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/try2/src/etc/adb_run_wrapper.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# usage : adb_run_wrapper [test dir - where test executables exist] [test executable]
33
#
44

5+
# Sometimes android shell produce exitcode "1 : Text File Busy"
6+
# Retry after $WAIT seconds, expecting resource cleaned-up
7+
WAIT=10
58
TEST_PATH=$1
69
BIN_PATH=/system/bin
710
if [ -d "$TEST_PATH" ]
@@ -13,9 +16,20 @@ then
1316
then
1417
shift
1518

19+
L_RET=1
20+
L_COUNT=0
1621
cd $TEST_PATH
17-
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH=$BIN_PATH:$TEST_PATH $TEST_PATH/$RUN $@ 1>$TEST_PATH/$RUN.stdout 2>$TEST_PATH/$RUN.stderr
18-
L_RET=$?
22+
while [ $L_RET -eq 1 ]
23+
do
24+
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH=$BIN_PATH:$TEST_PATH $TEST_PATH/$RUN $@ 1>$TEST_PATH/$RUN.stdout 2>$TEST_PATH/$RUN.stderr
25+
L_RET=$?
26+
if [ $L_COUNT -gt 0 ]
27+
then
28+
/system/bin/sleep $WAIT
29+
/system/bin/sync
30+
fi
31+
L_COUNT=$((L_COUNT+1))
32+
done
1933

2034
echo $L_RET > $TEST_PATH/$RUN.exitcode
2135

branches/try2/src/libfourcc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) ->
7474

7575
let little = match endian {
7676
None => false,
77-
Some(Ident{ident, span}) => match token::get_ident(ident).get() {
77+
Some(Ident{ident, span}) => match token::get_ident(ident.name).get() {
7878
"little" => true,
7979
"big" => false,
8080
"target" => target_endian_little(cx, sp),

branches/try2/src/libgreen/basic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ impl EventLoop for BasicLoop {
158158
}
159159

160160
fn io<'a>(&'a mut self) -> Option<&'a mut IoFactory> { None }
161-
162-
fn has_active_io(&self) -> bool { false }
163161
}
164162

165163
struct BasicRemote {

0 commit comments

Comments
 (0)