Skip to content

Commit a009fa3

Browse files
committed
---
yaml --- r: 149199 b: refs/heads/try2 c: 18477ac h: refs/heads/master i: 149197: fc9da41 149195: 53de4b4 149191: 080d316 149183: bda1f84 v: v3
1 parent a26855a commit a009fa3

File tree

123 files changed

+2412
-2836
lines changed

Some content is hidden

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

123 files changed

+2412
-2836
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: 3c02749ad873af24c5865e105bd1e6ded1b71409
8+
refs/heads/try2: 18477ac68a3daf8260be17be368f59a65c3b7527
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
60+
DEPS_green := std native:context_switch
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: 9 additions & 8 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 :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
303+
RUSTC_FLAGS_arm-linux-androideabi :=
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 := --linker=$(CROSS_PREFIX_arm-unknown-linux-gnueabihf)$(CXX_arm-unknown-linux-gnueabihf)
334+
RUSTC_CROSS_FLAGS_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__
346+
CFG_GCCISH_CFLAGS_arm-unknown-linux-gnueabi := -Wall -g -fPIC -D__arm__ -mfpu=vfp
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 := --linker=$(CROSS_PREFIX_arm-unknown-linux-gnueabi)$(CXX_arm-unknown-linux-gnueabi)
364+
RUSTC_CROSS_FLAGS_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 := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32 -Z soft-float
392+
RUSTC_FLAGS_mips-unknown-linux-gnu := -C target-cpu=mips32r2 -C target-feature="+mips32r2,+o32" -C 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 := --linker=$(CROSS_PREFIX_i686-w64-mingw32)$(CXX_i686-w64-mingw32)
478+
RUSTC_CROSS_FLAGS_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 := --linker=$(CROSS_PREFIX_x86_64-w64-mingw32)$(CXX_x86_64-w64-mingw32)
507+
RUSTC_CROSS_FLAGS_x86_64-w64-mingw32 :=
508508

509509
# x86_64-unknown-freebsd configuration
510510
CC_x86_64-unknown-freebsd=$(CC)
@@ -549,8 +549,9 @@ 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))
552553

553-
RUSTC_FLAGS_$(1)=$(RUSTC_CROSS_FLAGS_$(1))
554+
RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1))
554555
endif
555556

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

branches/try2/mk/rt.mk

Lines changed: 3 additions & 2 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
38+
NATIVE_LIBS := rustrt sundown uv_support morestack miniz context_switch
3939

4040
# $(1) is the target triple
4141
define NATIVE_LIBRARIES
@@ -54,9 +54,10 @@ 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 \
5857
arch/$$(HOST_$(1))/record_sp.S
5958
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
59+
NATIVE_DEPS_context_switch_$(1) := \
60+
arch/$$(HOST_$(1))/_context.S
6061

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

branches/try2/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,8 @@ 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-
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
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))" \
558559
$$(CTEST_TESTARGS)
559560

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

branches/try2/src/compiletest/common.rs

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

80-
// Flags to pass to the compiler
81-
rustcflags: Option<~str>,
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>,
8285

8386
// Run tests using the JIT
8487
jit: bool,

branches/try2/src/compiletest/compiletest.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ 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("", "rustcflags", "flags to pass to rustc", "FLAGS"),
67+
optopt("", "host-rustcflags", "flags to pass to rustc for host", "FLAGS"),
68+
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
6869
optflag("", "verbose", "run tests verbosely, showing all output"),
6970
optopt("", "logfile", "file to log test execution to", "FILE"),
7071
optopt("", "save-metrics", "file to save metrics to", "FILE"),
@@ -132,7 +133,8 @@ pub fn parse_config(args: ~[~str]) -> config {
132133
ratchet_noise_percent:
133134
matches.opt_str("ratchet-noise-percent").and_then(|s| from_str::<f64>(s)),
134135
runtool: matches.opt_str("runtool"),
135-
rustcflags: matches.opt_str("rustcflags"),
136+
host_rustcflags: matches.opt_str("host-rustcflags"),
137+
target_rustcflags: matches.opt_str("target-rustcflags"),
136138
jit: matches.opt_present("jit"),
137139
target: opt_str2(matches.opt_str("target")).to_str(),
138140
host: opt_str2(matches.opt_str("host")).to_str(),
@@ -161,7 +163,8 @@ pub fn log_config(config: &config) {
161163
logv(c, format!("run_ignored: {}", config.run_ignored));
162164
logv(c, format!("filter: {}", opt_str(&config.filter)));
163165
logv(c, format!("runtool: {}", opt_str(&config.runtool)));
164-
logv(c, format!("rustcflags: {}", opt_str(&config.rustcflags)));
166+
logv(c, format!("host-rustcflags: {}", opt_str(&config.host_rustcflags)));
167+
logv(c, format!("target-rustcflags: {}", opt_str(&config.target_rustcflags)));
165168
logv(c, format!("jit: {}", config.jit));
166169
logv(c, format!("target: {}", config.target));
167170
logv(c, format!("host: {}", config.host));
@@ -219,12 +222,14 @@ pub fn run_tests(config: &config) {
219222
mode_debug_info => {
220223
println!("arm-linux-androideabi debug-info \
221224
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");
228233
}
229234

230235
let opts = test_opts(config);

branches/try2/src/compiletest/runtest.rs

Lines changed: 9 additions & 5 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.rustcflags));
253+
args.push_all_move(split_maybe_args(&config.target_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.rustcflags {
263+
let mut config = match config.target_rustcflags {
264264
Some(ref flags) => config {
265-
rustcflags: Some(flags.replace("-O", "")),
265+
target_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.rustcflags);
332+
let args = split_maybe_args(&config.target_rustcflags);
333333
let mut tool_path:~str = ~"";
334334
for arg in args.iter() {
335335
if arg.contains("android-cross-path=") {
@@ -770,7 +770,11 @@ 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-
args.push_all_move(split_maybe_args(&config.rustcflags));
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+
}
774778
args.push_all_move(split_maybe_args(&props.compile_flags));
775779
return ProcArgs {prog: config.rustc_path.as_str().unwrap().to_owned(), args: args};
776780
}

branches/try2/src/etc/adb_run_wrapper.sh

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
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
85
TEST_PATH=$1
96
BIN_PATH=/system/bin
107
if [ -d "$TEST_PATH" ]
@@ -16,20 +13,9 @@ then
1613
then
1714
shift
1815

19-
L_RET=1
20-
L_COUNT=0
2116
cd $TEST_PATH
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
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=$?
3319

3420
echo $L_RET > $TEST_PATH/$RUN.exitcode
3521

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.name).get() {
77+
Some(Ident{ident, span}) => match token::get_ident(ident).get() {
7878
"little" => true,
7979
"big" => false,
8080
"target" => target_endian_little(cx, sp),

branches/try2/src/libgreen/basic.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ 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 }
161163
}
162164

163165
struct BasicRemote {

0 commit comments

Comments
 (0)