Skip to content

Commit bdace6b

Browse files
committed
---
yaml --- r: 151655 b: refs/heads/try2 c: fdb30cd h: refs/heads/master i: 151653: aa25093 151651: bf0451d 151647: e413a3e v: v3
1 parent c359774 commit bdace6b

File tree

36 files changed

+909
-1026
lines changed

36 files changed

+909
-1026
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: d78718ad6317b21c58cfd6723501a9487378b0c7
8+
refs/heads/try2: fdb30cd22cfc3db34874be13913a9c0720c64b3b
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/man/rustc.1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ A space-separated list of arguments to pass through to LLVM.
138138
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
139139
throughout compilation in the output directory.
140140
.TP
141+
\fBandroid-cross-path\fR=path/to/ndk/bin
142+
Directory to find the Android NDK cross-compilation tools
143+
.TP
141144
\fBno-rpath\fR
142145
If specified, then the rpath value for dynamic libraries will not be set in
143146
either dynamic library or executable outputs.

branches/try2/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ CFG_LDPATH_arm-linux-androideabi :=
307307
CFG_RUN_arm-linux-androideabi=
308308
CFG_RUN_TARG_arm-linux-androideabi=
309309
RUSTC_FLAGS_arm-linux-androideabi :=
310-
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=
310+
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
311311

312312
# arm-unknown-linux-gnueabihf configuration
313313
CROSS_PREFIX_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-

branches/try2/mk/tests.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,6 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
601601
--stage-id stage$(1)-$(2) \
602602
--target $(2) \
603603
--host $(3) \
604-
--android-cross-path=$(CFG_ANDROID_CROSS_PATH) \
605604
--adb-path=$(CFG_ADB) \
606605
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
607606
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \

branches/try2/src/compiletest/common.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ pub struct Config {
126126
// Host triple for the compiler being invoked
127127
pub host: ~str,
128128

129-
// Path to the android tools
130-
pub android_cross_path: Path,
131-
132129
// Extra parameter to run adb on arm-linux-androideabi
133130
pub adb_path: ~str,
134131

branches/try2/src/compiletest/compiletest.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ pub fn parse_config(args: Vec<~str> ) -> Config {
7979
optflag("", "jit", "run tests under the JIT"),
8080
optopt("", "target", "the target to build for", "TARGET"),
8181
optopt("", "host", "the host to build for", "HOST"),
82-
optopt("", "android-cross-path", "Android NDK standalone path", "PATH"),
8382
optopt("", "adb-path", "path to the android debugger", "PATH"),
8483
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
8584
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
@@ -143,7 +142,6 @@ pub fn parse_config(args: Vec<~str> ) -> Config {
143142
jit: matches.opt_present("jit"),
144143
target: opt_str2(matches.opt_str("target")).to_str(),
145144
host: opt_str2(matches.opt_str("host")).to_str(),
146-
android_cross_path: opt_path(matches, "android-cross-path"),
147145
adb_path: opt_str2(matches.opt_str("adb-path")).to_str(),
148146
adb_test_dir:
149147
opt_str2(matches.opt_str("adb-test-dir")).to_str(),
@@ -175,7 +173,6 @@ pub fn log_config(config: &Config) {
175173
logv(c, format!("jit: {}", config.jit));
176174
logv(c, format!("target: {}", config.target));
177175
logv(c, format!("host: {}", config.host));
178-
logv(c, format!("android-cross-path: {}", config.android_cross_path.display()));
179176
logv(c, format!("adb_path: {}", config.adb_path));
180177
logv(c, format!("adb_test_dir: {}", config.adb_test_dir));
181178
logv(c, format!("adb_device_status: {}", config.adb_device_status));

branches/try2/src/compiletest/runtest.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,18 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
347347
break;
348348
}
349349

350-
let tool_path = match config.android_cross_path.as_str() {
351-
Some(x) => x.to_strbuf(),
352-
None => fatal("cannot find android cross path".to_owned())
353-
};
350+
let args = split_maybe_args(&config.target_rustcflags);
351+
let mut tool_path = StrBuf::new();
352+
for arg in args.iter() {
353+
if arg.contains("android-cross-path=") {
354+
tool_path = StrBuf::from_str(arg.replace("android-cross-path=", ""));
355+
break;
356+
}
357+
}
358+
359+
if tool_path.is_empty() {
360+
fatal("cannot found android cross path".to_owned());
361+
}
354362

355363
let debugger_script = make_out_name(config, testfile, "debugger.script");
356364
// FIXME (#9639): This needs to handle non-utf8 paths

branches/try2/src/etc/zsh/_rust

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ local -a _rustc_opts_switches _rustc_opts_lint _rustc_opts_debug
55
typeset -A opt_args
66

77
_rustc_opts_switches=(
8+
--android-cross-path'[The path to the Android NDK]'
89
--ar'[Program to use for managing archives instead of the default.]'
910
-c'[Compile and assemble, but do not link]'
1011
--cfg'[Configure the compilation environment]'

branches/try2/src/libcollections/hashmap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,7 +1906,7 @@ mod test_map {
19061906
}
19071907
assert_eq!(m.len(), 32);
19081908

1909-
let mut observed: u32 = 0;
1909+
let mut observed = 0;
19101910

19111911
for (k, v) in m.iter() {
19121912
assert_eq!(*v, *k * 2);
@@ -2102,7 +2102,7 @@ mod test_set {
21022102
for i in range(0u, 32) {
21032103
assert!(a.insert(i));
21042104
}
2105-
let mut observed: u32 = 0;
2105+
let mut observed = 0;
21062106
for k in a.iter() {
21072107
observed |= 1 << *k;
21082108
}

0 commit comments

Comments
 (0)