Skip to content

Commit e444f2a

Browse files
committed
---
yaml --- r: 85899 b: refs/heads/dist-snap c: e3662b1 h: refs/heads/master i: 85897: f5082a0 85895: 88d5bf3 v: v3
1 parent ac2ecdd commit e444f2a

Some content is hidden

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

44 files changed

+1213
-1296
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: 78c5f97a09e7478181c9e4922dea0d4436a590c9
9+
refs/heads/dist-snap: e3662b188041b50c732896ded3de823144ae6556
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/librustc/metadata/decoder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use middle::typeck;
2626
use middle::astencode::vtable_decoder_helpers;
2727

2828

29+
use std::hash::HashUtil;
2930
use std::u64;
3031
use std::io::WriterUtil;
3132
use std::io;

branches/dist-snap/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use middle::typeck;
2121
use middle::astencode;
2222
use middle;
2323

24+
use std::hash::HashUtil;
2425
use std::hashmap::{HashMap, HashSet};
2526
use std::io;
2627
use std::str;

branches/dist-snap/src/librustc/middle/trans/type_use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn type_uses_for(ccx: @mut CrateContext, fn_id: def_id, n_tps: uint)
149149
"visit_tydesc" | "forget" | "frame_address" |
150150
"morestack_addr" => 0,
151151

152-
"offset" | "offset_inbounds" |
152+
"offset" |
153153
"memcpy32" | "memcpy64" | "memmove32" | "memmove64" |
154154
"memset32" | "memset64" => use_repr,
155155

branches/dist-snap/src/librustc/middle/typeck/check/mod.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,20 +3663,6 @@ pub fn check_intrinsic_type(ccx: @mut CrateCtxt, it: @ast::foreign_item) {
36633663
mutbl: ast::m_imm
36643664
}))
36653665
}
3666-
"offset_inbounds" => {
3667-
(1,
3668-
~[
3669-
ty::mk_ptr(tcx, ty::mt {
3670-
ty: param(ccx, 0),
3671-
mutbl: ast::m_imm
3672-
}),
3673-
ty::mk_int()
3674-
],
3675-
ty::mk_ptr(tcx, ty::mt {
3676-
ty: param(ccx, 0),
3677-
mutbl: ast::m_imm
3678-
}))
3679-
}
36803666
"memcpy32" => {
36813667
(1,
36823668
~[

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/rustpkg.rs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use path_util::{U_RWX, in_rust_path};
4343
use path_util::{built_executable_in_workspace, built_library_in_workspace, default_workspace};
4444
use path_util::{target_executable_in_workspace, target_library_in_workspace};
4545
use source_control::is_git_dir;
46-
use workspace::{each_pkg_parent_workspace, pkg_parent_workspaces, cwd_to_workspace};
46+
use workspace::{each_pkg_parent_workspace, pkg_parent_workspaces, in_workspace, cwd_to_workspace};
4747
use context::Ctx;
4848
use package_id::PkgId;
4949
use package_source::PkgSrc;
@@ -190,10 +190,11 @@ impl CtxMethods for Ctx {
190190
match cmd {
191191
"build" => {
192192
if args.len() < 1 {
193-
match cwd_to_workspace() {
194-
None => { usage::build(); return }
195-
Some((ws, pkgid)) => self.build(&ws, &pkgid)
193+
if !in_workspace(|| { usage::build() } ) {
194+
return;
196195
}
196+
let (workspace, pkgid) = cwd_to_workspace();
197+
self.build(&workspace, &pkgid);
197198
}
198199
else {
199200
// The package id is presumed to be the first command-line
@@ -209,12 +210,13 @@ impl CtxMethods for Ctx {
209210
}
210211
"clean" => {
211212
if args.len() < 1 {
212-
match cwd_to_workspace() {
213-
None => { usage::clean(); return }
214-
// tjc: Maybe clean should clean all the packages in the
215-
// current workspace, though?
216-
Some((ws, pkgid)) => self.clean(&ws, &pkgid)
213+
if !in_workspace(|| { usage::clean() } ) {
214+
return;
217215
}
216+
// tjc: Maybe clean should clean all the packages in the
217+
// current workspace, though?
218+
let (workspace, pkgid) = cwd_to_workspace();
219+
self.clean(&workspace, &pkgid);
218220

219221
}
220222
else {
@@ -237,10 +239,11 @@ impl CtxMethods for Ctx {
237239
}
238240
"install" => {
239241
if args.len() < 1 {
240-
match cwd_to_workspace() {
241-
None => { usage::install(); return }
242-
Some((ws, pkgid)) => self.install(&ws, &pkgid)
242+
if !in_workspace(|| { usage::install() }) {
243+
return;
243244
}
245+
let (workspace, pkgid) = cwd_to_workspace();
246+
self.install(&workspace, &pkgid);
244247
}
245248
else {
246249
// The package id is presumed to be the first command-line

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: 9 additions & 14 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),
@@ -696,8 +695,7 @@ fn package_script_with_default_build() {
696695
697696
#[test]
698697
fn rustpkg_build_no_arg() {
699-
let tmp = mkdtemp(&os::tmpdir(), "rustpkg_build_no_arg").expect("rustpkg_build_no_arg failed")
700-
.push(".rust");
698+
let tmp = mkdtemp(&os::tmpdir(), "rustpkg_build_no_arg").expect("rustpkg_build_no_arg failed");
701699
let package_dir = tmp.push("src").push("foo");
702700
assert!(os::mkdir_recursive(&package_dir, U_RWX));
703701
@@ -711,8 +709,7 @@ fn rustpkg_build_no_arg() {
711709
#[test]
712710
fn rustpkg_install_no_arg() {
713711
let tmp = mkdtemp(&os::tmpdir(),
714-
"rustpkg_install_no_arg").expect("rustpkg_install_no_arg failed")
715-
.push(".rust");
712+
"rustpkg_install_no_arg").expect("rustpkg_install_no_arg failed");
716713
let package_dir = tmp.push("src").push("foo");
717714
assert!(os::mkdir_recursive(&package_dir, U_RWX));
718715
writeFile(&package_dir.push("lib.rs"),
@@ -724,8 +721,7 @@ fn rustpkg_install_no_arg() {
724721
725722
#[test]
726723
fn rustpkg_clean_no_arg() {
727-
let tmp = mkdtemp(&os::tmpdir(), "rustpkg_clean_no_arg").expect("rustpkg_clean_no_arg failed")
728-
.push(".rust");
724+
let tmp = mkdtemp(&os::tmpdir(), "rustpkg_clean_no_arg").expect("rustpkg_clean_no_arg failed");
729725
let package_dir = tmp.push("src").push("foo");
730726
assert!(os::mkdir_recursive(&package_dir, U_RWX));
731727
@@ -1028,17 +1024,16 @@ fn test_extern_mod() {
10281024
test_sysroot().to_str(),
10291025
exec_file.to_str());
10301026
1031-
let prog = run::Process::new(rustc.to_str(), [main_file.to_str(),
1032-
~"--sysroot", test_sysroot().to_str(),
1033-
~"-o", exec_file.to_str()],
1034-
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 {
10351031
env: env,
10361032
dir: Some(&dir),
10371033
in_fd: None,
10381034
out_fd: None,
10391035
err_fd: None
10401036
});
1041-
let mut prog = prog.unwrap();
10421037
let outp = prog.finish_with_output();
10431038
if outp.status != 0 {
10441039
fail!("output was %s, error was %s",

0 commit comments

Comments
 (0)