Skip to content

Commit c8f7593

Browse files
committed
---
yaml --- r: 66038 b: refs/heads/master c: 3281f5b h: refs/heads/master v: v3
1 parent eab4627 commit c8f7593

File tree

185 files changed

+5999
-3391
lines changed

Some content is hidden

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

185 files changed

+5999
-3391
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d084d9e7df0da671765c8a2d9212757f16ab1c9d
2+
refs/heads/master: 3281f5b63792a57d2cea6e93446e63f44e1e3ea0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/Makefile.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ifdef SAVE_TEMPS
111111
CFG_RUSTC_FLAGS += --save-temps
112112
endif
113113
ifdef ASM_COMMENTS
114-
CFG_RUSTC_FLAGS += -Z asm-comments
114+
CFG_RUSTC_FLAGS += -z asm-comments
115115
endif
116116
ifdef TIME_PASSES
117117
CFG_RUSTC_FLAGS += -Z time-passes
@@ -208,6 +208,7 @@ CFG_STDLIB_$(1) :=$(call CFG_LIB_NAME_$(1),std)
208208
CFG_EXTRALIB_$(1) :=$(call CFG_LIB_NAME_$(1),extra)
209209
CFG_LIBRUSTC_$(1) :=$(call CFG_LIB_NAME_$(1),rustc)
210210
CFG_LIBSYNTAX_$(1) :=$(call CFG_LIB_NAME_$(1),syntax)
211+
CFG_LIBFUZZER_$(1) :=$(call CFG_LIB_NAME_$(1),fuzzer)
211212
CFG_LIBRUSTPKG_$(1) :=$(call CFG_LIB_NAME_$(1),rustpkg)
212213
CFG_LIBRUSTDOC_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc)
213214
CFG_LIBRUSTI_$(1) :=$(call CFG_LIB_NAME_$(1),rusti)
@@ -217,6 +218,7 @@ EXTRALIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),extra)
217218
STDLIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),std)
218219
LIBRUSTC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustc)
219220
LIBSYNTAX_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),syntax)
221+
LIBFUZZER_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),fuzzer)
220222
LIBRUSTPKG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustpkg)
221223
LIBRUSTDOC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc)
222224
LIBRUSTI_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rusti)
@@ -225,6 +227,7 @@ EXTRALIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),extra)
225227
STDLIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),std)
226228
LIBRUSTC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustc)
227229
LIBSYNTAX_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),syntax)
230+
LIBFUZZER_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),fuzzer)
228231
LIBRUSTPKG_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustpkg)
229232
LIBRUSTDOC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustdoc)
230233
LIBRUSTI_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rusti)
@@ -399,10 +402,12 @@ SREQ$(1)_T_$(2)_H_$(3) = \
399402
# Prerequisites for a working stageN compiler and libraries, for a specific target
400403
CSREQ$(1)_T_$(2)_H_$(3) = \
401404
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
405+
$$(HBIN$(1)_H_$(3))/fuzzer$$(X_$(3)) \
402406
$$(HBIN$(1)_H_$(3))/rustpkg$$(X_$(3)) \
403407
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
404408
$$(HBIN$(1)_H_$(3))/rusti$$(X_$(3)) \
405409
$$(HBIN$(1)_H_$(3))/rust$$(X_$(3)) \
410+
$$(HLIB$(1)_H_$(3))/$(CFG_LIBFUZZER_$(3)) \
406411
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
407412
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
408413
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
@@ -411,6 +416,7 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
411416
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)) \
412417
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(2)) \
413418
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2)) \
419+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER_$(2)) \
414420
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(2)) \
415421
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(2)) \
416422
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTI_$(2)) \

trunk/RELEASES.txt

Lines changed: 8 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,90 +4,36 @@ Version 0.7 (July 2013)
44
* ??? changes, numerous bugfixes
55

66
* Syntax changes
7-
* `use mod` is no longer valid.
8-
* `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
9-
argument list.
10-
* `Encodable`, `Decodable`, `TotalOrd`, `TotalEq`, `DeepClone` can all
11-
be automatically derived with `#[deriving(...)]`.
12-
* The `Durable` trait is replaced with the `'static` bounds.
13-
* At long last, 'argument modes' no longer exist.
14-
* The `bytes!` macro returns a vector of bytes for string, u8, char,
15-
and unsuffixed integer literals.
7+
* `#[deriving(Encodable)]`, `#[deriving(Decodable)]`
168

179
* Semantic changes
18-
* The borrow checker has been rewritten with flow-sensitivity, fixing
19-
many bugs and inconveniences.
2010
* The `self` parameter no longer implicitly means `&'self self`,
2111
and can be explicitly marked with a lifetime.
2212
* Structs with the `#[packed]` attribute have byte alignment and
2313
no padding between fields.
24-
* The `for` loop protocol now requires `for`-iterators to return `bool`
25-
so they compose better.
26-
* `Option<~T>` is now represented as a nullable pointer.
27-
* `@mut` does dynamic borrow checks correctly.
28-
* Macros TODO
29-
* The `main` function is only detected at the topmost level of the crate.
30-
The `#[main]` attribute is still valid anywhere.
31-
* Struct fields may no longer be mutable. Use inherited mutability.
32-
* The `#[non_owned]` attribute makes a type that would otherwise be
33-
`Owned`, not. TODO this may change to non_send before 0.7
34-
* The `#[mutable]` attribute makes a type that would otherwise be
35-
`Const`, note. TODO this may change to non_freeze before 0.7
36-
* Unbounded recursion will abort the process after reaching the limit
37-
specified by the `RUST_MAX_STACK` environment variable.
38-
* The `vecs_implicitly_copyable` lint mode has been removed. Vectors
39-
are never implicitly copyable.
4014

4115
* Libraries
16+
17+
**Note: in 0.7 `core` was renamed `std` and `std` to `extra.
18+
These notes use the new crate names.**
19+
4220
* The `core` crate was renamed to `std`.
4321
* The `std` crate was renamed to `extra`.
4422
* `std::mut` removed.
45-
* std: The prelude no longer reexports any modules, only types and traits.
46-
* std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
47-
`Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
4823
* std: `iterator` module for external iterator objects.
49-
* std: new numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
50-
`Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
51-
* std: Tuple traits and accessors defined for up to 12-tuples, e.g.
52-
`(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
5324
* std: many types implement `Clone` - tuples, @, @mut. TODO
5425
* std: `path` type renamed to `Path`.
5526
* std: Many standalone functions removed in favor of methods in
56-
`vec`, `str`. In the future methods will also work as functions.
57-
* std: `reinterpret_cast` removed. Used `transmute`.
58-
* std: ascii string handling in `std::ascii`.
59-
* std: `Rand` is implemented for ~/@.
60-
* std: `run` module for spawning processes overhauled.
61-
* std: Various atomic types added to `unstable::atomic`.
62-
* std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
63-
* std: Added `os::mkdir_recursive`.
64-
* std: Added `os::glob` function performs filesystems globs.
65-
* std: `FuzzyEq` renamed to `ApproxEq`.
66-
* std: `Map` now defines `pop` and `swap` methods.
67-
* extra: `flate` module moved from `std` to `extra`.
27+
`vec`, `str`, TODO. In the future methods will also work as functions.
6828
* extra: `FileInput` implements `std::io::Reader`.
6929
* extra: `Complex` number type and `complex` module.
7030
* extra: `Rational` number type and `rational` module.
7131
* extra: `BigInt`, `BigUint` implement numeric and comparison traits.
72-
* extra: `term` uses terminfo now, is more correct.
73-
74-
* Tooling
75-
* `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks.
76-
* `unused_mut` lint mode for identifying unused `mut` qualifiers.
77-
* The `rusti` command has been rewritten and a number of bugs addressed.
78-
* rustc outputs in color on more terminals.
79-
* rustc accepts a `--link-args` flag to pass arguments to the linker.
80-
* rustc accepts a `-Z print-link-args` flag for debugging linkage.
81-
* Compiling with `-g` will make the binary record information about
82-
dynamic borrowcheck failures for debugging.
83-
* rustdoc has a nicer stylesheet.
84-
* Various improvements to rustdoc.
8532

8633
* Other
34+
* `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks.
8735
* More and improved library documentation.
88-
* Various improvements on ARM and Android.
89-
* Various improvements to MIPS backend.
90-
* jemalloc is the Rust allocator.
36+
* The `rusti` command has been rewritten and a number of bugs addressed.
9137

9238
Version 0.6 (April 2013)
9339
------------------------

trunk/doc/rust.css

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,41 @@ body {
1212
}
1313

1414
h1 {
15-
font-size: 24pt;
16-
margin-top: 1.6em;
15+
font-size: 20pt;
16+
margin-top: 2em;
1717
padding-left: 0.4em;
1818
line-height: 1.6em;
1919
background-color:#FFF2CE;
2020
border-radius: 0.2em;
21+
border: 1px solid rgba(0, 0, 0, 0.15);
2122
}
2223

2324
h2 {
24-
font-size: 16pt;
25-
margin-top: 1.6em;
26-
padding: 0.2em 0.5em;
25+
font-size: 15pt;
26+
margin-top: 2em;
27+
padding-left: 0.4em;
2728
background-color:#FFF2CE;
2829
border-radius: 0.4em;
30+
border: 1px solid rgba(0, 0, 0, 0.15);
2931
}
3032

3133
h2 code {
3234
color: #097334;
33-
font-size: 16pt;
35+
font-size: 15pt;
3436
}
3537

3638
h3 {
37-
font-size: 14pt;
39+
font-size: 13pt;
3840
color: black;
3941
background-color:#D9E7FF;
4042
border-radius: 0.4em;
41-
padding: 0.2em 0.5em;
43+
border: 1px solid rgba(0, 0, 0, 0.15);
44+
padding: 0 0.4em 0 0.4em;
4245
}
4346

4447
h3 code {
4548
color: #541800;
46-
font-size: 14pt;
49+
font-size: 13pt;
4750
font-style: italic;
4851
}
4952

trunk/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ Within the body of an item that has type parameter declarations, the names of it
28262826
~~~~~~~
28272827
fn map<A: Copy, B: Copy>(f: &fn(A) -> B, xs: &[A]) -> ~[B] {
28282828
if xs.len() == 0 { return ~[]; }
2829-
let first: B = f(copy xs[0]);
2829+
let first: B = f(xs[0]);
28302830
let rest: ~[B] = map(f, xs.slice(1, xs.len()));
28312831
return ~[first] + rest;
28322832
}

trunk/doc/tutorial-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ fn pnorm(nums: &~[float], p: uint) -> float {
359359
360360
fn main() {
361361
let numbers = vec::from_fn(1000000, |_| rand::random::<float>());
362-
println(fmt!("Inf-norm = %?", *numbers.iter().max().unwrap()));
362+
println(fmt!("Inf-norm = %?", numbers.max()));
363363
364364
let numbers_arc = ARC(numbers);
365365

trunk/doc/tutorial.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,14 +1941,12 @@ fn head_bad<T>(v: &[T]) -> T {
19411941
~~~~
19421942

19431943
However, we can tell the compiler that the `head` function is only for
1944-
copyable types: that is, those that have the `Copy` trait. In that
1945-
case, we can explicitly create a second copy of the value we are
1946-
returning using the `copy` keyword:
1944+
copyable types: that is, those that have the `Copy` trait.
19471945

19481946
~~~~
19491947
// This does
19501948
fn head<T: Copy>(v: &[T]) -> T {
1951-
copy v[0]
1949+
v[0]
19521950
}
19531951
~~~~
19541952

@@ -2041,12 +2039,17 @@ themselves contain type parameters. A trait for generalized sequence
20412039
types might look like the following:
20422040

20432041
~~~~
2042+
# use std::vec;
20442043
trait Seq<T> {
2045-
fn length(&self) -> uint;
2044+
fn len(&self) -> uint;
2045+
fn iter(&self, b: &fn(v: &T));
20462046
}
20472047
20482048
impl<T> Seq<T> for ~[T] {
2049-
fn length(&self) -> uint { self.len() }
2049+
fn len(&self) -> uint { self.len() }
2050+
fn iter(&self, b: &fn(v: &T)) {
2051+
for vec::each(*self) |elt| { b(elt); }
2052+
}
20502053
}
20512054
~~~~
20522055

@@ -2139,7 +2142,7 @@ as in this version of `print_all` that copies elements.
21392142
fn print_all<T: Printable + Copy>(printable_things: ~[T]) {
21402143
let mut i = 0;
21412144
while i < printable_things.len() {
2142-
let copy_of_thing = copy printable_things[i];
2145+
let copy_of_thing = printable_things[i];
21432146
copy_of_thing.print();
21442147
i += 1;
21452148
}

trunk/mk/clean.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ define CLEAN_HOST_STAGE_N
6363

6464
clean$(1)_H_$(2):
6565
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustc$(X_$(2))
66+
$(Q)rm -f $$(HBIN$(1)_H_$(2))/fuzzer$(X_$(2))
6667
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustpkg$(X_$(2))
6768
$(Q)rm -f $$(HBIN$(1)_H_$(2))/serializer$(X_$(2))
6869
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustdoc$(X_$(2))
6970
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rusti$(X_$(2))
7071
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rust$(X_$(2))
72+
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBFUZZER_$(2))
7173
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTPKG_$(2))
7274
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC_$(2))
7375
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUNTIME_$(2))
@@ -81,6 +83,7 @@ clean$(1)_H_$(2):
8183
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(EXTRALIB_GLOB_$(2))
8284
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTC_GLOB_$(2))
8385
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBSYNTAX_GLOB_$(2))
86+
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBFUZZER_GLOB_$(2))
8487
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTPKG_GLOB_$(2))
8588
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOC_GLOB_$(2))
8689
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTI_GLOB_$(2))
@@ -98,11 +101,13 @@ define CLEAN_TARGET_STAGE_N
98101

99102
clean$(1)_T_$(2)_H_$(3):
100103
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustc$(X_$(2))
104+
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/fuzzer$(X_$(2))
101105
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustpkg$(X_$(2))
102106
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/serializer$(X_$(2))
103107
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustdoc$(X_$(2))
104108
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rusti$(X_$(2))
105109
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rust$(X_$(2))
110+
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER_$(2))
106111
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(2))
107112
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(2))
108113
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME_$(2))
@@ -116,6 +121,7 @@ clean$(1)_T_$(2)_H_$(3):
116121
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(EXTRALIB_GLOB_$(2))
117122
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTC_GLOB_$(2))
118123
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB_$(2))
124+
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBFUZZER_GLOB_$(2))
119125
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTPKG_GLOB_$(2))
120126
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOC_GLOB_$(2))
121127
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTI_GLOB_$(2))

trunk/mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ PKG_FILES := \
3232
librustc \
3333
compiletest \
3434
etc \
35+
libfuzzer \
3536
libextra \
3637
libstd \
3738
libsyntax \

trunk/mk/pp.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ else
1717
$(wildcard $(addprefix $(S)src/rustc/,*.rs */*.rs */*/*.rs)) \
1818
$(wildcard $(S)src/test/*/*.rs \
1919
$(S)src/test/*/*/*.rs) \
20+
$(wildcard $(S)src/fuzzer/*.rs) \
2021
$(wildcard $(S)src/rustpkg/*.rs) \
2122
$(wildcard $(S)src/rusti/*.rs) \
2223
$(wildcard $(S)src/rust/*.rs)

trunk/mk/tools.mk

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# Rules for non-core tools built with the compiler, both for target
1212
# and host architectures
1313

14+
FUZZER_LIB := $(S)src/libfuzzer/fuzzer.rc
15+
FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/libfuzzer/, *.rs))
16+
1417
# The test runner that runs the cfail/rfail/rpass and bxench tests
1518
COMPILETEST_CRATE := $(S)src/compiletest/compiletest.rc
1619
COMPILETEST_INPUTS := $(wildcard $(S)src/compiletest/*rs)
@@ -35,6 +38,21 @@ RUST_INPUTS := $(wildcard $(S)src/librust/*.rs)
3538
# have tools that need to built for other targets.
3639
define TOOLS_STAGE_N_TARGET
3740

41+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBFUZZER_$(4)): \
42+
$$(FUZZER_LIB) $$(FUZZER_INPUTS) \
43+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
44+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
45+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
46+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4))
47+
@$$(call E, compile_and_link: $$@)
48+
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
49+
50+
$$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X_$(4)): \
51+
$$(DRIVER_CRATE) \
52+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBFUZZER_$(4))
53+
@$$(call E, compile_and_link: $$@)
54+
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg fuzzer -o $$@ $$<
55+
3856
$$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X_$(4)): \
3957
$$(COMPILETEST_CRATE) $$(COMPILETEST_INPUTS) \
4058
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
@@ -110,6 +128,27 @@ endef
110128

111129
define TOOLS_STAGE_N_HOST
112130

131+
132+
# Promote the stageN target to stageN+1 host
133+
# FIXME: Shouldn't need to depend on host/librustc.so once
134+
# rpath is working
135+
$$(HLIB$(2)_H_$(4))/$(CFG_LIBFUZZER_$(4)): \
136+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBFUZZER_$(4)) \
137+
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)) \
138+
$$(HSREQ$(2)_H_$(4))
139+
@$$(call E, cp: $$@)
140+
$$(Q)cp $$< $$@
141+
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBFUZZER_GLOB_$(4)) \
142+
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBFUZZER_DSYM_GLOB_$(4))) \
143+
$$(HLIB$(2)_H_$(4))
144+
145+
$$(HBIN$(2)_H_$(4))/fuzzer$$(X_$(4)): \
146+
$$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X_$(4)) \
147+
$$(HLIB$(2)_H_$(4))/$(CFG_LIBFUZZER_$(4)) \
148+
$$(HSREQ$(2)_H_$(4))
149+
@$$(call E, cp: $$@)
150+
$$(Q)cp $$< $$@
151+
113152
$$(HBIN$(2)_H_$(4))/compiletest$$(X_$(4)): \
114153
$$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X_$(4)) \
115154
$$(HSREQ$(2)_H_$(4))

0 commit comments

Comments
 (0)