Skip to content

Commit 10412f4

Browse files
committed
---
yaml --- r: 80625 b: refs/heads/auto c: 07e821a h: refs/heads/master i: 80623: 14cedb3 v: v3
1 parent 9e490c4 commit 10412f4

File tree

129 files changed

+4818
-1884
lines changed

Some content is hidden

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

129 files changed

+4818
-1884
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 4f92f452bd701fb39156d66d4756cc48cc396a8a
16+
refs/heads/auto: 07e821aa6ba47df7fd579c35960c0cb0d4073c76
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/.gitattributes

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
22

3-
* text=auto
3+
* text eol=lf
44
*.cpp rust
55
*.h rust
66
*.rs rust
77
src/rt/msvc/* -whitespace
88
src/rt/vg/* -whitespace
99
src/rt/linenoise/* -whitespace
1010
src/rt/jemalloc/**/* -whitespace
11-
src/rt/jemalloc/include/jemalloc/jemalloc.h.in text eol=lf
12-
src/rt/jemalloc/include/jemalloc/jemalloc_defs.h.in text eol=lf
13-
src/rt/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in text eol=lf

branches/auto/Makefile.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ CFG_LIBRUSTC_$(1) :=$(call CFG_LIB_NAME_$(1),rustc)
214214
CFG_LIBSYNTAX_$(1) :=$(call CFG_LIB_NAME_$(1),syntax)
215215
CFG_LIBRUSTPKG_$(1) :=$(call CFG_LIB_NAME_$(1),rustpkg)
216216
CFG_LIBRUSTDOC_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc)
217+
CFG_LIBRUSTDOCNG_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc_ng)
217218
CFG_LIBRUSTI_$(1) :=$(call CFG_LIB_NAME_$(1),rusti)
218219
CFG_LIBRUST_$(1) :=$(call CFG_LIB_NAME_$(1),rust)
219220

@@ -223,6 +224,7 @@ LIBRUSTC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustc)
223224
LIBSYNTAX_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),syntax)
224225
LIBRUSTPKG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustpkg)
225226
LIBRUSTDOC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc)
227+
LIBRUSTDOCNG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc_ng)
226228
LIBRUSTI_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rusti)
227229
LIBRUST_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rust)
228230
EXTRALIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),extra)
@@ -231,6 +233,7 @@ LIBRUSTC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustc)
231233
LIBSYNTAX_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),syntax)
232234
LIBRUSTPKG_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustpkg)
233235
LIBRUSTDOC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustdoc)
236+
LIBRUSTDOCNG_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustdoc_ng)
234237
LIBRUSTI_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rusti)
235238
LIBRUST_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rust)
236239

@@ -443,6 +446,7 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
443446
$$(HBIN$(1)_H_$(3))/rust$$(X_$(3)) \
444447
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
445448
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
449+
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(3)) \
446450
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
447451
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUST_$(3)) \
448452
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
@@ -451,6 +455,7 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
451455
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2)) \
452456
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(2)) \
453457
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(2)) \
458+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(2)) \
454459
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTI_$(2)) \
455460
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUST_$(2))
456461

branches/auto/doc/tutorial-conditions.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn read_int_pairs() -> ~[(int,int)] {
9191
[a, b] => {
9292
9393
// 5. Try parsing both fields as ints.
94-
match (int::from_str(a), int::from_str(b)) {
94+
match (from_str::<int>(a), from_str::<int>(b)) {
9595
9696
// 6. If parsing succeeded for both, push both.
9797
(Some(a), Some(b)) => pairs.push((a,b)),
@@ -124,7 +124,7 @@ for conveying a value of type `T`, represented as `Some(T)`
124124
_or_ the sentinel `None`, to indicate the absence of a `T` value.
125125
For simple APIs, it may be sufficient to encode errors as `Option<T>`,
126126
returning `Some(T)` on success and `None` on error.
127-
In the example program, the call to `int::from_str` returns `Option<int>`
127+
In the example program, the call to `from_str::<int>` returns `Option<int>`
128128
with the understanding that "all parse errors" result in `None`.
129129
The resulting `Option<int>` values are matched against the pattern `(Some(a), Some(b))`
130130
in steps 5 and 6 in the example program,
@@ -161,7 +161,7 @@ This second mechanism for indicating an error is called a `Result`.
161161
The type `std::result::Result<T,E>` is another simple `enum` type with two forms, `Ok(T)` and `Err(E)`.
162162
The `Result` type is not substantially different from the `Option` type in terms of its ergonomics.
163163
Its main advantage is that the error constructor `Err(E)` can convey _more detail_ about the error.
164-
For example, the `int::from_str` API could be reformed
164+
For example, the `from_str` API could be reformed
165165
to return a `Result` carrying an informative description of a parse error,
166166
like this:
167167

@@ -172,7 +172,7 @@ enum IntParseErr {
172172
BadChar(char)
173173
}
174174
175-
fn int::from_str(&str) -> Result<int,IntParseErr> {
175+
fn from_str(&str) -> Result<int,IntParseErr> {
176176
// ...
177177
}
178178
~~~~
@@ -297,8 +297,8 @@ fn read_int_pairs() -> ~[(int,int)] {
297297
let line = fi.read_line();
298298
let fields = line.word_iter().to_owned_vec();
299299
match fields {
300-
[a, b] => pairs.push((int::from_str(a).unwrap(),
301-
int::from_str(b).unwrap())),
300+
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
301+
from_str::<int>(b).unwrap())),
302302
303303
// Explicitly fail on malformed lines.
304304
_ => fail!()
@@ -398,8 +398,8 @@ fn read_int_pairs() -> ~[(int,int)] {
398398
let line = fi.read_line();
399399
let fields = line.word_iter().to_owned_vec();
400400
match fields {
401-
[a, b] => pairs.push((int::from_str(a).unwrap(),
402-
int::from_str(b).unwrap())),
401+
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
402+
from_str::<int>(b).unwrap())),
403403
404404
// On malformed lines, call the condition handler and
405405
// push whatever the condition handler returns.
@@ -475,8 +475,8 @@ fn read_int_pairs() -> ~[(int,int)] {
475475
let line = fi.read_line();
476476
let fields = line.word_iter().to_owned_vec();
477477
match fields {
478-
[a, b] => pairs.push((int::from_str(a).unwrap(),
479-
int::from_str(b).unwrap())),
478+
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
479+
from_str::<int>(b).unwrap())),
480480
_ => pairs.push(malformed_line::cond.raise(line.clone()))
481481
}
482482
}
@@ -553,8 +553,8 @@ fn read_int_pairs() -> ~[(int,int)] {
553553
let line = fi.read_line();
554554
let fields = line.word_iter().to_owned_vec();
555555
match fields {
556-
[a, b] => pairs.push((int::from_str(a).unwrap(),
557-
int::from_str(b).unwrap())),
556+
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
557+
from_str::<int>(b).unwrap())),
558558
559559
// On malformed lines, call the condition handler and
560560
// either ignore the line (if the handler returns `None`)
@@ -649,8 +649,8 @@ fn read_int_pairs() -> ~[(int,int)] {
649649
let line = fi.read_line();
650650
let fields = line.word_iter().to_owned_vec();
651651
match fields {
652-
[a, b] => pairs.push((int::from_str(a).unwrap(),
653-
int::from_str(b).unwrap())),
652+
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
653+
from_str::<int>(b).unwrap())),
654654
655655
// On malformed lines, call the condition handler and
656656
// take action appropriate to the enum value returned.
@@ -776,7 +776,7 @@ fn main() {
776776
// Parse an int; if parsing fails, call the condition handler and
777777
// return whatever it returns.
778778
fn parse_int(x: &str) -> int {
779-
match int::from_str(x) {
779+
match from_str::<int>(x) {
780780
Some(v) => v,
781781
None => malformed_int::cond.raise(x.to_owned())
782782
}
@@ -833,8 +833,8 @@ There are three other things to note in this variant of the example program:
833833
so long as the `raise` occurs within a callee (of any depth) of the logic protected by the `trap` call,
834834
it will invoke the handler.
835835

836-
- This variant insulates callers from a design choice in the `int` library:
837-
the `int::from_str` function was designed to return an `Option<int>`,
836+
- This variant insulates callers from a design choice in the library:
837+
the `from_str` function was designed to return an `Option<int>`,
838838
but this program insulates callers from that choice,
839839
routing all `None` values that arise from parsing integers in this file into the condition.
840840

@@ -873,4 +873,4 @@ To compensate for this risk, correct C++ and Java code must program in an extrem
873873
or else risk introducing silent and very difficult-to-debug errors due to control resuming in a corrupted heap after a caught exception.
874874
These errors are frequently memory-safety errors, which Rust strives to eliminate,
875875
and so Rust unwinding is unrecoverable within a single task:
876-
once unwinding starts, the entire local heap of a task is destroyed and the task is terminated.
876+
once unwinding starts, the entire local heap of a task is destroyed and the task is terminated.

branches/auto/doc/tutorial-tasks.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,14 @@ concurrency at this writing:
4747

4848
* [`std::task`] - All code relating to tasks and task scheduling,
4949
* [`std::comm`] - The message passing interface,
50-
* [`std::pipes`] - The underlying messaging infrastructure,
51-
* [`extra::comm`] - Additional messaging types based on `std::pipes`,
50+
* [`extra::comm`] - Additional messaging types based on `std::comm`,
5251
* [`extra::sync`] - More exotic synchronization tools, including locks,
5352
* [`extra::arc`] - The Arc (atomically reference counted) type,
5453
for safely sharing immutable data,
5554
* [`extra::future`] - A type representing values that may be computed concurrently and retrieved at a later time.
5655

5756
[`std::task`]: std/task.html
5857
[`std::comm`]: std/comm.html
59-
[`std::pipes`]: std/pipes.html
6058
[`extra::comm`]: extra/comm.html
6159
[`extra::sync`]: extra/sync.html
6260
[`extra::arc`]: extra/arc.html
@@ -125,7 +123,7 @@ receiving messages. Pipes are low-level communication building-blocks and so
125123
come in a variety of forms, each one appropriate for a different use case. In
126124
what follows, we cover the most commonly used varieties.
127125

128-
The simplest way to create a pipe is to use the `pipes::stream`
126+
The simplest way to create a pipe is to use the `comm::stream`
129127
function to create a `(Port, Chan)` pair. In Rust parlance, a *channel*
130128
is a sending endpoint of a pipe, and a *port* is the receiving
131129
endpoint. Consider the following example of calculating two results

branches/auto/mk/clean.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ clean$(1)_H_$(2):
7272
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rust$(X_$(2))
7373
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTPKG_$(2))
7474
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC_$(2))
75+
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOCNG_$(2))
7576
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUNTIME_$(2))
7677
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_STDLIB_$(2))
7778
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_EXTRALIB_$(2))
@@ -85,6 +86,7 @@ clean$(1)_H_$(2):
8586
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBSYNTAX_GLOB_$(2))
8687
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTPKG_GLOB_$(2))
8788
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOC_GLOB_$(2))
89+
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOCNG_GLOB_$(2))
8890
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTI_GLOB_$(2))
8991
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUST_GLOB_$(2))
9092
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUSTLLVM_$(2))
@@ -107,6 +109,7 @@ clean$(1)_T_$(2)_H_$(3):
107109
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rust$(X_$(2))
108110
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(2))
109111
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(2))
112+
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(2))
110113
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME_$(2))
111114
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
112115
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))
@@ -120,6 +123,7 @@ clean$(1)_T_$(2)_H_$(3):
120123
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB_$(2))
121124
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTPKG_GLOB_$(2))
122125
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOC_GLOB_$(2))
126+
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOCNG_GLOB_$(2))
123127
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTI_GLOB_$(2))
124128
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUST_GLOB_$(2))
125129
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(2))

branches/auto/mk/install.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
104104
$$(Q)$$(call INSTALL_LIB,$$(LIBSYNTAX_GLOB_$(1)))
105105
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTPKG_GLOB_$(1)))
106106
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTDOC_GLOB_$(1)))
107+
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTDOCNG_GLOB_$(1)))
107108
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTI_GLOB_$(1)))
108109
$$(Q)$$(call INSTALL_LIB,$$(LIBRUST_GLOB_$(1)))
109110
$$(Q)$$(call INSTALL_LIB,libmorestack.a)
@@ -149,6 +150,7 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
149150
$(Q)$(call INSTALL_LIB,$(LIBRUST_GLOB_$(CFG_BUILD_TRIPLE)))
150151
$(Q)$(call INSTALL_LIB,$(LIBRUSTPKG_GLOB_$(CFG_BUILD_TRIPLE)))
151152
$(Q)$(call INSTALL_LIB,$(LIBRUSTDOC_GLOB_$(CFG_BUILD_TRIPLE)))
153+
$(Q)$(call INSTALL_LIB,$(LIBRUSTDOCNG_GLOB_$(CFG_BUILD_TRIPLE)))
152154
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME_$(CFG_BUILD_TRIPLE)))
153155
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM_$(CFG_BUILD_TRIPLE)))
154156
$(Q)$(call INSTALL,$(S)/man, $(PREFIX_ROOT)/share/man/man1,rust.1)

branches/auto/mk/platform.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ else
4747
CFG_GCCISH_CFLAGS += -O2
4848
endif
4949

50+
# The soname thing is for supporting a statically linked jemalloc.
51+
# see https://blog.mozilla.org/jseward/2012/06/05/valgrind-now-supports-jemalloc-builds-directly/
5052
ifdef CFG_VALGRIND
5153
CFG_VALGRIND += --error-exitcode=100 \
54+
--soname-synonyms=somalloc=NONE \
5255
--quiet \
5356
--suppressions=$(CFG_SRC_DIR)src/etc/x86.supp \
5457
$(OS_SUPP)

branches/auto/mk/rt.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ else ifeq ($(OSTYPE_$(1)), apple-darwin)
102102
LIBUV_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/libuv/libuv.a
103103
JEMALLOC_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/jemalloc/lib/libjemalloc_pic.a
104104
else ifeq ($(OSTYPE_$(1)), unknown-freebsd)
105-
LIBUV_OSTYPE_$(1)_$(2) := unix/freebsd
105+
LIBUV_OSTYPE_$(1)_$(2) := freebsd
106106
LIBUV_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/libuv/libuv.a
107107
JEMALLOC_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/jemalloc/lib/libjemalloc_pic.a
108108
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
109-
LIBUV_OSTYPE_$(1)_$(2) := unix/android
109+
LIBUV_OSTYPE_$(1)_$(2) := android
110110
LIBUV_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/libuv/libuv.a
111111
JEMALLOC_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/jemalloc/lib/libjemalloc_pic.a
112112
else
113-
LIBUV_OSTYPE_$(1)_$(2) := unix/linux
113+
LIBUV_OSTYPE_$(1)_$(2) := linux
114114
LIBUV_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/libuv/libuv.a
115115
JEMALLOC_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/jemalloc/lib/libjemalloc_pic.a
116116
endif
@@ -178,6 +178,7 @@ export PYTHONPATH := $(PYTHONPATH):$$(S)src/gyp/pylib
178178
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_DEPS)
179179
(cd $(S)src/libuv/ && \
180180
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
181+
-DOS=$$(LIBUV_OSTYPE_$(1)_$(2)) \
181182
-Goutput_dir=$$(@D) --generator-output $$(@D))
182183

183184
# XXX: Shouldn't need platform-specific conditions here

branches/auto/mk/tools.mk

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ RUSTPKG_INPUTS := $(wildcard $(S)src/librustpkg/*.rs)
2323
RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rs
2424
RUSTDOC_INPUTS := $(wildcard $(S)src/librustdoc/*.rs)
2525

26+
# rustdoc_ng, the next generation documentation tool
27+
28+
RUSTDOCNG_LIB := $(S)src/rustdoc_ng/lib.rs
29+
RUSTDOCNG_INPUTS := $(wildcard $(S)src/rustdoc_ng/*.rs)
30+
2631
# Rusti, the JIT REPL
2732
RUSTI_LIB := $(S)src/librusti/rusti.rs
2833
RUSTI_INPUTS := $(wildcard $(S)src/librusti/*.rs)
@@ -78,6 +83,24 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X_$(4)): \
7883
@$$(call E, compile_and_link: $$@)
7984
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustdoc -o $$@ $$<
8085

86+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(4)): \
87+
$$(RUSTDOCNG_LIB) $$(RUSTDOCNG_INPUTS) \
88+
$$(SREQ$(1)_T_$(4)_H_$(3)) \
89+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
90+
| $$(TLIB$(1)_T_$(4)_H_$(3))/
91+
@$$(call E, compile_and_link: $$@)
92+
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTDOCNG_GLOB_$(4)),$$(notdir $$@))
93+
$$(STAGE$(1)_T_$(4)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
94+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTDOCNG_GLOB_$(4)),$$(notdir $$@))
95+
96+
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc_ng$$(X_$(4)): \
97+
$$(DRIVER_CRATE) \
98+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
99+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(4)) \
100+
| $$(TBIN$(1)_T_$(4)_H_$(3))/
101+
@$$(call E, compile_and_link: $$@)
102+
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustdoc_ng -o $$@ $$<
103+
81104
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)): \
82105
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
83106
$$(SREQ$(1)_T_$(4)_H_$(3)) \
@@ -102,6 +125,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \
102125
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \
103126
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)) \
104127
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)) \
128+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(4)) \
105129
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
106130
| $$(TLIB$(1)_T_$(4)_H_$(3))/
107131
@$$(call E, compile_and_link: $$@)
@@ -171,6 +195,19 @@ $$(HBIN$(2)_H_$(4))/rustdoc$$(X_$(4)): \
171195
@$$(call E, cp: $$@)
172196
$$(Q)cp $$< $$@
173197

198+
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTDOCNG_$(4)): \
199+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(4)) \
200+
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)) \
201+
$$(HSREQ$(2)_H_$(4)) \
202+
| $$(HLIB$(2)_H_$(4))/
203+
@$$(call E, cp: $$@)
204+
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTDOCNG_GLOB_$(4)),$$(notdir $$@))
205+
$$(Q)cp $$< $$@
206+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTDOCNG_GLOB_$(4)),$$(notdir $$@))
207+
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTDOCNG_GLOB_$(4)) \
208+
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTDOCNG_DSYM_GLOB_$(4))) \
209+
$$(HLIB$(2)_H_$(4))
210+
174211
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTI_$(4)): \
175212
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)) \
176213
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)) \

0 commit comments

Comments
 (0)