Skip to content

Commit 88d5bf3

Browse files
committed
---
yaml --- r: 85895 b: refs/heads/dist-snap c: 06a7195 h: refs/heads/master i: 85893: c78f80f 85891: 6117d04 85887: f00e975 v: v3
1 parent f219cb6 commit 88d5bf3

33 files changed

+1594
-1701
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 0983ebe5310d4eb6d289f636f7ed0536c08bbc0e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 4635644746034bd01306159cc952cbdda23b3703
9+
refs/heads/dist-snap: 06a7195e9e9cea81854c39ce2c1376fe588bc1b0
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
branch = master
55
[submodule "src/libuv"]
66
path = src/libuv
7-
url = https://github.com/alexcrichton/libuv.git
7+
url = https://github.com/brson/libuv.git
88
branch = master

branches/dist-snap/mk/rt.mk

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -163,49 +163,34 @@ LIBUV_DEPS := $$(wildcard \
163163
$$(S)src/libuv/*/*/*/*)
164164
endif
165165

166-
LIBUV_GYP := $$(S)src/libuv/build/gyp
167-
LIBUV_MAKEFILE_$(1)_$(2) := $$(CFG_BUILD_DIR)rt/$(1)/stage$(2)/libuv/Makefile
168-
LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \
169-
uv_dtrace_header.target.mk uv_dtrace_provider.target.mk
170-
171-
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_GYP)
172-
(cd $(S)src/libuv/ && \
173-
./gyp_uv -f make -Dtarget_arch=$$(HOST_$(1)) -D ninja \
174-
-Goutput_dir=$$(@D) --generator-output $$(@D))
175-
176166
# XXX: Shouldn't need platform-specific conditions here
177167
ifdef CFG_WINDOWSY_$(1)
178168
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
179-
$$(Q)rm -f $$(S)src/libuv/libuv.a
180-
$$(Q)$$(MAKE) -C $$(S)src/libuv -f Makefile.mingw \
181-
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
182-
AR="$$(AR_$(1))" \
169+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
170+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
171+
OS=mingw \
183172
V=$$(VERBOSE)
184-
$$(Q)cp $$(S)src/libuv/libuv.a $$@
185173
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
186-
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)_$(2))
187-
$$(Q)$$(MAKE) -C $$(@D) \
174+
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
175+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
188176
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
189177
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
190178
CC="$$(CC_$(1))" \
191179
CXX="$$(CXX_$(1))" \
192180
AR="$$(AR_$(1))" \
193-
host=android OS=linux \
194-
builddir="." \
195181
BUILDTYPE=Release \
196-
NO_LOAD="$$(LIBUV_NO_LOAD)" \
182+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
183+
host=android OS=linux \
197184
V=$$(VERBOSE)
198185
else
199-
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)_$(2))
200-
$$(Q)$$(MAKE) -C $$(@D) \
186+
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
187+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
201188
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
202189
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
203190
CC="$$(CC_$(1))" \
204191
CXX="$$(CXX_$(1))" \
205192
AR="$$(AR_$(1))" \
206-
builddir="." \
207-
BUILDTYPE=Release \
208-
NO_LOAD="$$(LIBUV_NO_LOAD)" \
193+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
209194
V=$$(VERBOSE)
210195
endif
211196

@@ -269,7 +254,3 @@ endef
269254
$(foreach stage,$(STAGES), \
270255
$(foreach target,$(CFG_TARGET_TRIPLES), \
271256
$(eval $(call DEF_RUNTIME_TARGETS,$(target),$(stage)))))
272-
273-
$(LIBUV_GYP):
274-
mkdir -p $(S)src/libuv/build
275-
git clone https://git.chromium.org/external/gyp.git $(S)src/libuv/build/gyp

branches/dist-snap/src/compiletest/procsrv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ pub fn run(lib_path: &str,
5454
in_fd: None,
5555
out_fd: None,
5656
err_fd: None
57-
}).unwrap();
57+
});
5858

5959
for input in input.iter() {
60-
proc.input().write(input.as_bytes());
60+
proc.input().write_str(*input);
6161
}
6262
let output = proc.finish_with_output();
6363

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,41 @@ use procsrv;
2020
use util;
2121
use util::logv;
2222

23+
use std::cell::Cell;
2324
use std::io;
2425
use std::os;
2526
use std::str;
27+
use std::task::{spawn_sched, SingleThreaded};
2628
use std::vec;
29+
use std::unstable::running_on_valgrind;
2730

2831
use extra::test::MetricMap;
2932

3033
pub fn run(config: config, testfile: ~str) {
31-
let mut _mm = MetricMap::new();
32-
run_metrics(config, testfile, &mut _mm);
34+
let config = Cell::new(config);
35+
let testfile = Cell::new(testfile);
36+
// FIXME #6436: Creating another thread to run the test because this
37+
// is going to call waitpid. The new scheduler has some strange
38+
// interaction between the blocking tasks and 'friend' schedulers
39+
// that destroys parallelism if we let normal schedulers block.
40+
// It should be possible to remove this spawn once std::run is
41+
// rewritten to be non-blocking.
42+
//
43+
// We do _not_ create another thread if we're running on V because
44+
// it serializes all threads anyways.
45+
if running_on_valgrind() {
46+
let config = config.take();
47+
let testfile = testfile.take();
48+
let mut _mm = MetricMap::new();
49+
run_metrics(config, testfile, &mut _mm);
50+
} else {
51+
do spawn_sched(SingleThreaded) {
52+
let config = config.take();
53+
let testfile = testfile.take();
54+
let mut _mm = MetricMap::new();
55+
run_metrics(config, testfile, &mut _mm);
56+
}
57+
}
3358
}
3459

3560
pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {

branches/dist-snap/src/librustdoc/markdown_writer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ fn pandoc_writer(
104104
];
105105
106106
do generic_writer |markdown| {
107+
use std::io::WriterUtil;
108+
107109
debug!("pandoc cmd: %s", pandoc_cmd);
108110
debug!("pandoc args: %s", pandoc_args.connect(" "));
109111

110-
let proc = run::Process::new(pandoc_cmd, pandoc_args,
111-
run::ProcessOptions::new());
112-
let mut proc = proc.unwrap();
112+
let mut proc = run::Process::new(pandoc_cmd, pandoc_args, run::ProcessOptions::new());
113113

114-
proc.input().write(markdown.as_bytes());
114+
proc.input().write_str(markdown);
115115
let output = proc.finish_with_output();
116116

117117
debug!("pandoc result: %i", output.status);

branches/dist-snap/src/librustpkg/source_control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub fn git_clone_general(source: &str, target: &Path, v: &Version) -> bool {
8989

9090
fn process_output_in_cwd(prog: &str, args: &[~str], cwd: &Path) -> ProcessOutput {
9191
let mut prog = Process::new(prog, args, ProcessOptions{ dir: Some(cwd)
92-
,..ProcessOptions::new()}).unwrap();
92+
,..ProcessOptions::new()});
9393
prog.finish_with_output()
9494
}
9595

branches/dist-snap/src/librustpkg/tests.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,13 @@ fn mk_temp_workspace(short_name: &Path, version: &Version) -> Path {
112112

113113
fn run_git(args: &[~str], env: Option<~[(~str, ~str)]>, cwd: &Path, err_msg: &str) {
114114
let cwd = (*cwd).clone();
115-
let prog = run::Process::new("git", args, run::ProcessOptions {
115+
let mut prog = run::Process::new("git", args, run::ProcessOptions {
116116
env: env,
117117
dir: Some(&cwd),
118118
in_fd: None,
119119
out_fd: None,
120120
err_fd: None
121121
});
122-
let mut prog = prog.unwrap();
123122
let rslt = prog.finish_with_output();
124123
if rslt.status != 0 {
125124
fail!("%s [git returned %?, output = %s, error = %s]", err_msg,
@@ -227,7 +226,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
227226
in_fd: None,
228227
out_fd: None,
229228
err_fd: None
230-
}).unwrap();
229+
});
231230
let output = prog.finish_with_output();
232231
debug!("Output from command %s with args %? was %s {%s}[%?]",
233232
cmd, args, str::from_bytes(output.output),
@@ -1025,17 +1024,16 @@ fn test_extern_mod() {
10251024
test_sysroot().to_str(),
10261025
exec_file.to_str());
10271026
1028-
let prog = run::Process::new(rustc.to_str(), [main_file.to_str(),
1029-
~"--sysroot", test_sysroot().to_str(),
1030-
~"-o", exec_file.to_str()],
1031-
run::ProcessOptions {
1027+
let mut prog = run::Process::new(rustc.to_str(), [main_file.to_str(),
1028+
~"--sysroot", test_sysroot().to_str(),
1029+
~"-o", exec_file.to_str()],
1030+
run::ProcessOptions {
10321031
env: env,
10331032
dir: Some(&dir),
10341033
in_fd: None,
10351034
out_fd: None,
10361035
err_fd: None
10371036
});
1038-
let mut prog = prog.unwrap();
10391037
let outp = prog.finish_with_output();
10401038
if outp.status != 0 {
10411039
fail!("output was %s, error was %s",

0 commit comments

Comments
 (0)