Skip to content

Commit 23a16f5

Browse files
committed
---
yaml --- r: 149555 b: refs/heads/try2 c: e26ba36 h: refs/heads/master i: 149553: 723e59f 149551: 7c05658 v: v3
1 parent 8cc2d23 commit 23a16f5

File tree

393 files changed

+4819
-5629
lines changed

Some content is hidden

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

393 files changed

+4819
-5629
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: 25d68366b73c24bd9b7d277b38da087420d63f9b
8+
refs/heads/try2: e26ba3605a7e6f9697c5e8878d60e466f93b7e2e
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.travis.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

branches/try2/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Adrien Tétar <[email protected]>
77
Alan Andrade <[email protected]>
88
Aleksander Balicki <[email protected]>
99
Alex Crichton <[email protected]>
10-
Alex Lyon <[email protected]>
1110
Alex Rønne Petersen <[email protected]>
1211
Alexander Stavonin <[email protected]>
1312
Alexandros Tasos <[email protected]>

branches/try2/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ then
604604
LLVM_VERSION=$($LLVM_CONFIG --version)
605605

606606
case $LLVM_VERSION in
607-
(3.[2-5]svn|3.[2-5])
607+
(3.[2-4]svn|3.[2-4])
608608
msg "found ok version of LLVM: $LLVM_VERSION"
609609
;;
610610
(*)
@@ -626,7 +626,7 @@ then
626626
| cut -d ' ' -f 2)
627627

628628
case $CFG_CLANG_VERSION in
629-
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* )
629+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* )
630630
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
631631
CFG_C_COMPILER="clang"
632632
;;

branches/try2/mk/crates.mk

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,34 @@
5050
################################################################################
5151

5252
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53-
uuid serialize sync getopts collections num test time
53+
uuid serialize sync getopts collections num test
5454
HOST_CRATES := syntax rustc rustdoc fourcc
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
5757

5858
DEPS_std := native:rustrt native:compiler-rt
59-
DEPS_extra := std term sync serialize getopts collections time
59+
DEPS_extra := std term sync serialize getopts collections
6060
DEPS_green := std native:context_switch
6161
DEPS_rustuv := std native:uv native:uv_support
6262
DEPS_native := std
6363
DEPS_syntax := std term serialize collections
6464
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
65-
collections time extra
65+
collections extra
6666
DEPS_rustdoc := rustc native:sundown serialize sync getopts collections \
67-
test time
68-
DEPS_flate := std extra native:miniz
67+
test
68+
DEPS_flate := std native:miniz
6969
DEPS_arena := std collections
7070
DEPS_glob := std
71-
DEPS_serialize := std collections
72-
DEPS_term := std collections
71+
DEPS_serialize := std
72+
DEPS_term := std
7373
DEPS_semver := std
7474
DEPS_uuid := std serialize
7575
DEPS_sync := std
7676
DEPS_getopts := std
77-
DEPS_collections := std
77+
DEPS_collections := std serialize
7878
DEPS_fourcc := syntax std
79-
DEPS_num := std
79+
DEPS_num := std extra
8080
DEPS_test := std extra collections getopts serialize term
81-
DEPS_time := std serialize
8281

8382
TOOL_DEPS_compiletest := test green rustuv getopts
8483
TOOL_DEPS_rustdoc := rustdoc green rustuv

branches/try2/mk/main.mk

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,8 @@ LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt llvm-extract
218218
define DEF_LLVM_VARS
219219
# The configure script defines these variables with the target triples
220220
# separated by Z. This defines new ones with the expected format.
221-
ifeq ($$(CFG_LLVM_ROOT),)
222221
CFG_LLVM_BUILD_DIR_$(1):=$$(CFG_LLVM_BUILD_DIR_$(subst -,_,$(1)))
223222
CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_INST_DIR_$(subst -,_,$(1)))
224-
else
225-
CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_ROOT)
226-
endif
227223

228224
# Any rules that depend on LLVM should depend on LLVM_CONFIG
229225
LLVM_CONFIG_$(1):=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-config$$(X_$(1))
@@ -345,10 +341,10 @@ endif
345341
ifdef CFG_DISABLE_RPATH
346342
ifeq ($$(OSTYPE_$(3)),apple-darwin)
347343
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
348-
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(HLIB$(1)_H_$(3))"
344+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
349345
else
350346
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
351-
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(HLIB$(1)_H_$(3))"
347+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
352348
endif
353349
else
354350
RPATH_VAR$(1)_T_$(2)_H_$(3) :=

branches/try2/mk/prepare.mk

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
# It requires the following variables to be set:
1818
#
19-
# PREPARE_HOST - the host triple
19+
# PREPARE_HOST - the host triple
2020
# PREPARE_TARGETS - the target triples, space separated
2121
# PREPARE_DEST_DIR - the directory to put the image
2222

@@ -172,10 +172,7 @@ prepare-target-$(2)-host-$(3)-$(1): \
172172
$$(if $$(findstring $(2),$$(CFG_HOST)), \
173173
$$(foreach crate,$$(HOST_CRATES), \
174174
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)),)
175-
# Only install if this host and target combo is being prepared. Also be sure to
176-
# *not* install the rlibs for host crates because there's no need to statically
177-
# link against most of them. They just produce a large amount of extra size
178-
# bloat.
175+
# Only install if this host and target combo is being prepared
179176
$$(if $$(findstring $(1), $$(PREPARE_STAGE)),\
180177
$$(if $$(findstring $(2), $$(PREPARE_TARGETS)),\
181178
$$(if $$(findstring $(3), $$(PREPARE_HOST)),\
@@ -185,7 +182,8 @@ prepare-target-$(2)-host-$(3)-$(1): \
185182
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate))))\
186183
$$(if $$(findstring $(2),$$(CFG_HOST)),\
187184
$$(foreach crate,$$(HOST_CRATES),\
188-
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))),)\
185+
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))\
186+
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate)))),)\
189187
$$(call PREPARE_LIB,libmorestack.a) \
190188
$$(call PREPARE_LIB,libcompiler-rt.a),),),)
191189
endef

branches/try2/mk/tests.mk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ endif
171171
# Main test targets
172172
######################################################################
173173

174-
check: cleantmptestlogs cleantestlibs tidy check-notidy
175-
176-
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
174+
check: cleantestlibs cleantmptestlogs tidy all check-stage2
177175
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
178176

179177
check-lite: cleantestlibs cleantmptestlogs \
@@ -708,8 +706,9 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3)
708706
ifeq ($(2),$$(CFG_BUILD))
709707
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
710708
@$$(call E, run doc-$(4) [$(2)])
711-
$$(Q)$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) --test \
712-
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
709+
$$(Q)$$(RPATH_VAR$(1)_T_$(2)_H_$(3)) \
710+
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) --test \
711+
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
713712
else
714713
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
715714
touch $$@
@@ -936,7 +935,8 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
936935
$(3)/test/run-make/$$* \
937936
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
938937
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
939-
"$$(TESTNAME)"
938+
"$$(TESTNAME)" \
939+
"$$(RPATH_VAR$(1)_T_$(2)_H_$(3))"
940940
@touch $$@
941941
else
942942
# FIXME #11094 - The above rule doesn't work right for multiple targets

branches/try2/src/README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@ Source layout:
1010
| `libgreen/` | The M:N runtime library |
1111
| `libnative/` | The 1:1 runtime library |
1212
| `libsyntax/` | The Rust parser and pretty-printer |
13-
| `libcollections/` | A collection of useful data structures and containers |
14-
| `libnum/` | Extended number support library (complex, rational, etc) |
15-
| `libtest/` | Rust's test-runner code |
16-
| ------------------- | --------------------------------------------------------- |
17-
| `libarena/` | The arena (a fast but limited) memory allocator |
18-
| `libflate/` | Simple compression library |
19-
| `libfourcc/` | Data format identifier library |
20-
| `libgetopts/` | Get command-line-options library |
21-
| `libglob/` | Unix glob patterns library |
22-
| `libsemver/` | Rust's semantic versioning library |
23-
| `libserialize/` | Encode-Decode types library |
24-
| `libsync/` | Concurrency mechanisms and primitives |
25-
| `libterm/` | ANSI color library for terminals |
26-
| `libtime/` | Time operations library |
27-
| `libuuid/` | UUID's handling code |
2813
| ------------------- | --------------------------------------------------------- |
2914
| `rt/` | The runtime system |
3015
| `rt/rust_*.c` | - Some of the runtime services |
@@ -46,13 +31,8 @@ Source layout:
4631
| ------------------- | --------------------------------------------------------- |
4732
| `librustdoc/` | The Rust API documentation tool |
4833
| `libuv/` | The libuv submodule |
49-
| `librustuv/` | Rust libuv support code |
5034
| ------------------- | --------------------------------------------------------- |
5135
| `llvm/` | The LLVM submodule |
5236
| `rustllvm/` | LLVM support code |
5337
| ------------------- | --------------------------------------------------------- |
5438
| `etc/` | Scripts, editors support, misc |
55-
56-
57-
NOTE: This list (especially the second part of the table which contains modules and libraries)
58-
is highly volatile and subject to change.

branches/try2/src/compiletest/procsrv.rs

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
// except according to those terms.
1010

1111
use std::os;
12+
use std::run;
1213
use std::str;
13-
use std::io::process::{ProcessExit, Process, ProcessConfig, ProcessOutput};
14+
use std::io::process::ProcessExit;
1415

1516
#[cfg(target_os = "win32")]
1617
fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
@@ -35,8 +36,26 @@ fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
3536
#[cfg(target_os = "linux")]
3637
#[cfg(target_os = "macos")]
3738
#[cfg(target_os = "freebsd")]
38-
fn target_env(_lib_path: &str, _prog: &str) -> ~[(~str,~str)] {
39-
os::env()
39+
fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
40+
// Make sure we include the aux directory in the path
41+
let aux_path = prog + ".libaux";
42+
43+
let mut env = os::env();
44+
let var = if cfg!(target_os = "macos") {
45+
"DYLD_LIBRARY_PATH"
46+
} else {
47+
"LD_LIBRARY_PATH"
48+
};
49+
let prev = match env.iter().position(|&(ref k, _)| k.as_slice() == var) {
50+
Some(i) => env.remove(i).unwrap().val1(),
51+
None => ~"",
52+
};
53+
env.push((var.to_owned(), if prev.is_empty() {
54+
lib_path + ":" + aux_path
55+
} else {
56+
lib_path + ":" + aux_path + ":" + prev
57+
}));
58+
return env;
4059
}
4160

4261
pub struct Result {status: ProcessExit, out: ~str, err: ~str}
@@ -48,19 +67,17 @@ pub fn run(lib_path: &str,
4867
input: Option<~str>) -> Option<Result> {
4968

5069
let env = env + target_env(lib_path, prog);
51-
let mut opt_process = Process::configure(ProcessConfig {
52-
program: prog,
53-
args: args,
54-
env: Some(env.as_slice()),
55-
.. ProcessConfig::new()
70+
let mut opt_process = run::Process::new(prog, args, run::ProcessOptions {
71+
env: Some(env),
72+
.. run::ProcessOptions::new()
5673
});
5774

5875
match opt_process {
5976
Ok(ref mut process) => {
6077
for input in input.iter() {
61-
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();
78+
process.input().write(input.as_bytes()).unwrap();
6279
}
63-
let ProcessOutput { status, output, error } = process.wait_with_output();
80+
let run::ProcessOutput { status, output, error } = process.finish_with_output();
6481

6582
Some(Result {
6683
status: status,
@@ -76,20 +93,18 @@ pub fn run_background(lib_path: &str,
7693
prog: &str,
7794
args: &[~str],
7895
env: ~[(~str, ~str)],
79-
input: Option<~str>) -> Option<Process> {
96+
input: Option<~str>) -> Option<run::Process> {
8097

8198
let env = env + target_env(lib_path, prog);
82-
let opt_process = Process::configure(ProcessConfig {
83-
program: prog,
84-
args: args,
85-
env: Some(env.as_slice()),
86-
.. ProcessConfig::new()
99+
let opt_process = run::Process::new(prog, args, run::ProcessOptions {
100+
env: Some(env),
101+
.. run::ProcessOptions::new()
87102
});
88103

89104
match opt_process {
90105
Ok(mut process) => {
91106
for input in input.iter() {
92-
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();
107+
process.input().write(input.as_bytes()).unwrap();
93108
}
94109

95110
Some(process)

branches/try2/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
360360
stdout: out,
361361
stderr: err,
362362
cmdline: cmdline};
363-
process.signal_kill().unwrap();
363+
process.force_destroy().unwrap();
364364
}
365365

366366
_=> {

branches/try2/src/doc/complement-cheatsheet.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ let y: int = x.unwrap();
2222

2323
**Int to string, in non-base-10**
2424

25-
Use the `format!` syntax extension.
25+
Use [`ToStrRadix`](http://static.rust-lang.org/doc/master/std/num/trait.ToStrRadix.html).
2626

2727
~~~
28+
use std::num::ToStrRadix;
29+
2830
let x: int = 42;
29-
let y: ~str = format!("{:t}", x); // binary
30-
let y: ~str = format!("{:o}", x); // octal
31-
let y: ~str = format!("{:x}", x); // lowercase hexadecimal
32-
let y: ~str = format!("{:X}", x); // uppercase hexidecimal
31+
let y: ~str = x.to_str_radix(16);
3332
~~~
3433

3534
**String to int, in non-base-10**
@@ -211,7 +210,7 @@ Description C signature Equivalent
211210
---------------------- ---------------------------------------------- ------------------------------------------
212211
no parameters `void foo(void);` `fn foo();`
213212
return value `int foo(void);` `fn foo() -> c_int;`
214-
function parameters `void foo(int x, int y);` `fn foo(x: c_int, y: c_int);`
213+
function parameters `void foo(int x, int y);` `fn foo(x: int, y: int);`
215214
in-out pointers `void foo(const int* in_ptr, int* out_ptr);` `fn foo(in_ptr: *c_int, out_ptr: *mut c_int);`
216215
217216
Note: The Rust signatures should be wrapped in an `extern "ABI" { ... }` block.

0 commit comments

Comments
 (0)