Skip to content

Commit 25cdd9d

Browse files
committed
---
yaml --- r: 95345 b: refs/heads/dist-snap c: 478c9b7 h: refs/heads/master i: 95343: 2529f04 v: v3
1 parent db4ecb0 commit 25cdd9d

40 files changed

+1105
-791
lines changed

[refs]

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

branches/dist-snap/Makefile.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ CFG_LIBSYNTAX_$(1) :=$(call CFG_LIB_NAME_$(1),syntax)
222222
CFG_LIBRUSTPKG_$(1) :=$(call CFG_LIB_NAME_$(1),rustpkg)
223223
CFG_LIBRUSTDOC_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc)
224224
CFG_LIBRUSTI_$(1) :=$(call CFG_LIB_NAME_$(1),rusti)
225+
CFG_LIBRUST_$(1) :=$(call CFG_LIB_NAME_$(1),rust)
225226

226227
EXTRALIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),extra)
227228
STDLIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),std)
@@ -230,13 +231,15 @@ LIBSYNTAX_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),syntax)
230231
LIBRUSTPKG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustpkg)
231232
LIBRUSTDOC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc)
232233
LIBRUSTI_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rusti)
234+
LIBRUST_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rust)
233235
EXTRALIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),extra)
234236
STDLIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),std)
235237
LIBRUSTC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustc)
236238
LIBSYNTAX_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),syntax)
237239
LIBRUSTPKG_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustpkg)
238240
LIBRUSTDOC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustdoc)
239241
LIBRUSTI_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rusti)
242+
LIBRUST_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rust)
240243

241244
endef
242245

@@ -444,16 +447,19 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
444447
$$(HBIN$(1)_H_$(3))/rustpkg$$(X_$(3)) \
445448
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
446449
$$(HBIN$(1)_H_$(3))/rusti$$(X_$(3)) \
450+
$$(HBIN$(1)_H_$(3))/rust$$(X_$(3)) \
447451
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
448452
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
449453
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
454+
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUST_$(3)) \
450455
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
451456
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)) \
452457
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(2)) \
453458
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2)) \
454459
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(2)) \
455460
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(2)) \
456461
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTI_$(2)) \
462+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUST_$(2))
457463

458464
ifeq ($(1),0)
459465
# Don't run the the stage0 compiler under valgrind - that ship has sailed

branches/dist-snap/doc/rustpkg.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ and builds it in any workspace(s) where it finds one.
137137
Supposing such packages are found in workspaces X, Y, and Z,
138138
the command leaves behind files in `X`'s, `Y`'s, and `Z`'s `build` directories,
139139
but not in their `lib` or `bin` directories.
140-
(The exception is when rustpkg fetches a package `foo`'s sources from a remote repository.
141-
In that case, it stores both the sources *and* the build artifacts for `foo`
142-
in the workspace that `foo` will install to (see ##install below)).
143140

144141
## clean
145142

@@ -151,11 +148,7 @@ in the workspace that `foo` will install to (see ##install below)).
151148
If `RUST_PATH` is declared as an environment variable, then rustpkg installs the
152149
libraries and executables into the `lib` and `bin` subdirectories
153150
of the first entry in `RUST_PATH`.
154-
Otherwise, if the current working directory CWD is a workspace,
155-
it installs them into CWD's `lib` and `bin` subdirectories.
156-
Otherwise, if the current working directory is CWD,
157-
it installs them into the .rust/lib and .rust/bin subdirectories of CWD
158-
(creating them if necessary).
151+
Otherwise, it installs them into `foo`'s `lib` and `bin` directories.
159152

160153
## test
161154

branches/dist-snap/man/rust.1

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
.TH RUST "1" "July 2013" "rust 0.7" "User Commands"
2+
.SH NAME
3+
rust \- a front-end to the Rust toolchain
4+
.SH SYNOPSIS
5+
.B rust
6+
[\fICOMMAND\fR] [\fIOPTIONS\fR] \fIINPUT\fR
7+
8+
.SH DESCRIPTION
9+
This tool is a front-end for the Rust language, available at
10+
<\fBhttps://www.rust-lang.org\fR>. It provides commands to
11+
run, test and package Rust programs.
12+
13+
.SH COMMANDS
14+
15+
.TP
16+
\fBbuild\fR
17+
compile rust source files
18+
.TP
19+
\fBrun\fR
20+
build an executable, and run it
21+
.TP
22+
\fBtest\fR
23+
build a test executable, and run it
24+
.TP
25+
\fBdoc\fR
26+
generate documentation from doc comments
27+
.TP
28+
\fBpkg\fR
29+
download, build, install rust packages
30+
.TP
31+
\fBsketch\fR
32+
run a rust interpreter
33+
.TP
34+
\fBhelp\fR
35+
show detailed usage of a command
36+
37+
The build, run and test commands take the same parameters
38+
as the rustc command.
39+
40+
.SS "BUILD COMMAND"
41+
42+
The \fBbuild\fR command is a shortcut for the \fBrustc\fR command line.
43+
All options will be passed to the compiler verbatim. For example, to build
44+
an optimised version:
45+
46+
$ rust build -O <filename>
47+
48+
.SS "RUN COMMAND"
49+
50+
The \fBrun\fR command is a shortcut for the \fBrustc\fR command line.
51+
All options will be passed to the compiler verbatim, and if the compilation
52+
is successful, the resultant executable will be invoked. For example, to
53+
build and run an optimised version:
54+
55+
$ rust run -O <filename>
56+
57+
.SS "TEST COMMAND"
58+
59+
The \fBtest\fR command is a shortcut for the command line:
60+
61+
$ rustc --test <filename> -o <filestem>test~ && ./<filestem>test~
62+
63+
.SS "DOC COMMAND"
64+
65+
The \fBdoc\fR command is an alias for the rustdoc program. It is equivalent to:
66+
67+
$ rustdoc [options] <cratefile>
68+
69+
.SS "PKG COMMAND"
70+
71+
The \fBpkg\fR command is an alias for the rustpkg program. It is equivalent to:
72+
73+
$ rustpkg [options] <cratefile>
74+
75+
.SS "SKETCH COMMAND"
76+
77+
The \fBsketch\fR command launches the \fBrusti\fR interactive shell.
78+
79+
.SS "HELP COMMAND"
80+
81+
The \fBhelp\fR command displays a summary of available commands (ie. this text).
82+
83+
.SH "EXAMPLES"
84+
85+
To build an executable (with a main function):
86+
$ rust build hello.rs
87+
88+
To build a library from a source file:
89+
$ rust build --lib hello-lib.rs
90+
91+
To build and run an executable:
92+
$ rust run hello.rs
93+
94+
To build an executable with unit tests and execute the tests:
95+
$ rust test hello.rs
96+
97+
To create a package
98+
99+
.SH "SEE ALSO"
100+
rustc, rustdoc, rustpkg, rusti
101+
102+
.SH "BUGS"
103+
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
104+
105+
.SH "AUTHOR"
106+
See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
107+
<\fI[email protected]\fR> is the project leader.
108+
109+
.SH "COPYRIGHT"
110+
This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR
111+
file in the rust source distribution.

branches/dist-snap/mk/clean.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,15 @@ clean$(1)_H_$(2):
7777
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTC_$(2))
7878
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBSYNTAX_$(2))
7979
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTI_$(2))
80+
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUST_$(2))
8081
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(STDLIB_GLOB_$(2))
8182
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(EXTRALIB_GLOB_$(2))
8283
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTC_GLOB_$(2))
8384
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBSYNTAX_GLOB_$(2))
8485
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTPKG_GLOB_$(2))
8586
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOC_GLOB_$(2))
8687
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTI_GLOB_$(2))
88+
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUST_GLOB_$(2))
8789
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUSTLLVM_$(2))
8890
$(Q)rm -f $$(HLIB$(1)_H_$(2))/libstd.rlib
8991

@@ -110,13 +112,15 @@ clean$(1)_T_$(2)_H_$(3):
110112
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2))
111113
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(2))
112114
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTI_$(2))
115+
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUST_$(2))
113116
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(STDLIB_GLOB_$(2))
114117
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(EXTRALIB_GLOB_$(2))
115118
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTC_GLOB_$(2))
116119
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB_$(2))
117120
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTPKG_GLOB_$(2))
118121
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOC_GLOB_$(2))
119122
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTI_GLOB_$(2))
123+
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUST_GLOB_$(2))
120124
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(2))
121125
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib
122126
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a

branches/dist-snap/mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ PKG_FILES := \
3030
driver \
3131
librustpkg \
3232
librusti \
33+
librust \
3334
librustc \
3435
compiletest \
3536
etc \

branches/dist-snap/mk/install.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
105105
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTPKG_GLOB_$(1)))
106106
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTDOC_GLOB_$(1)))
107107
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTI_GLOB_$(1)))
108+
$$(Q)$$(call INSTALL_LIB,$$(LIBRUST_GLOB_$(1)))
108109
$$(Q)$$(call INSTALL_LIB,libmorestack.a)
109110

110111
endef
@@ -139,15 +140,18 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
139140
$(Q)$(call INSTALL,$(HB2),$(PHB),rustpkg$(X_$(CFG_BUILD_TRIPLE)))
140141
$(Q)$(call INSTALL,$(HB2),$(PHB),rustdoc$(X_$(CFG_BUILD_TRIPLE)))
141142
$(Q)$(call INSTALL,$(HB2),$(PHB),rusti$(X_$(CFG_BUILD_TRIPLE)))
143+
$(Q)$(call INSTALL,$(HB2),$(PHB),rust$(X_$(CFG_BUILD_TRIPLE)))
142144
$(Q)$(call INSTALL_LIB,$(STDLIB_GLOB_$(CFG_BUILD_TRIPLE)))
143145
$(Q)$(call INSTALL_LIB,$(EXTRALIB_GLOB_$(CFG_BUILD_TRIPLE)))
144146
$(Q)$(call INSTALL_LIB,$(LIBRUSTC_GLOB_$(CFG_BUILD_TRIPLE)))
145147
$(Q)$(call INSTALL_LIB,$(LIBSYNTAX_GLOB_$(CFG_BUILD_TRIPLE)))
146148
$(Q)$(call INSTALL_LIB,$(LIBRUSTI_GLOB_$(CFG_BUILD_TRIPLE)))
149+
$(Q)$(call INSTALL_LIB,$(LIBRUST_GLOB_$(CFG_BUILD_TRIPLE)))
147150
$(Q)$(call INSTALL_LIB,$(LIBRUSTPKG_GLOB_$(CFG_BUILD_TRIPLE)))
148151
$(Q)$(call INSTALL_LIB,$(LIBRUSTDOC_GLOB_$(CFG_BUILD_TRIPLE)))
149152
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME_$(CFG_BUILD_TRIPLE)))
150153
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM_$(CFG_BUILD_TRIPLE)))
154+
$(Q)$(call INSTALL,$(S)/man, $(PREFIX_ROOT)/share/man/man1,rust.1)
151155
$(Q)$(call INSTALL,$(S)/man, $(PREFIX_ROOT)/share/man/man1,rustc.1)
152156
$(Q)$(call INSTALL,$(S)/man, $(PREFIX_ROOT)/share/man/man1,rustdoc.1)
153157
$(Q)$(call INSTALL,$(S)/man, $(PREFIX_ROOT)/share/man/man1,rusti.1)
@@ -163,6 +167,7 @@ uninstall:
163167
$(Q)rm -f $(PHB)/rustc$(X_$(CFG_BUILD_TRIPLE))
164168
$(Q)rm -f $(PHB)/rustpkg$(X_$(CFG_BUILD_TRIPLE))
165169
$(Q)rm -f $(PHB)/rusti$(X_$(CFG_BUILD_TRIPLE))
170+
$(Q)rm -f $(PHB)/rust$(X_$(CFG_BUILD_TRIPLE))
166171
$(Q)rm -f $(PHB)/rustdoc$(X_$(CFG_BUILD_TRIPLE))
167172
$(Q)rm -f $(PHL)/$(CFG_RUSTLLVM_$(CFG_BUILD_TRIPLE))
168173
$(Q)rm -f $(PHL)/$(CFG_RUNTIME_$(CFG_BUILD_TRIPLE))
@@ -174,10 +179,12 @@ uninstall:
174179
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTPKG_GLOB_$(CFG_BUILD_TRIPLE))) \
175180
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTDOC_GLOB_$(CFG_BUILD_TRIPLE))) \
176181
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTI_GLOB_$(CFG_BUILD_TRIPLE))) \
182+
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUST_GLOB_$(CFG_BUILD_TRIPLE))) \
177183
; \
178184
do rm -f $$i ; \
179185
done
180186
$(Q)rm -Rf $(PHL)/rustc
187+
$(Q)rm -f $(PREFIX_ROOT)/share/man/man1/rust.1
181188
$(Q)rm -f $(PREFIX_ROOT)/share/man/man1/rustc.1
182189
$(Q)rm -f $(PREFIX_ROOT)/share/man/man1/rustdoc.1
183190
$(Q)rm -f $(PREFIX_ROOT)/share/man/man1/rusti.1

branches/dist-snap/mk/tests.mk

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# The names of crates that must be tested
1717
TEST_TARGET_CRATES = std extra
18-
TEST_HOST_CRATES = rusti rustpkg rustc rustdoc syntax
18+
TEST_HOST_CRATES = rust rusti rustpkg rustc rustdoc syntax
1919
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2020

2121
# Markdown files under doc/ that should have their code extracted and run
@@ -387,6 +387,16 @@ $(3)/stage$(1)/test/rustitest-$(2)$$(X_$(2)): \
387387
@$$(call E, compile_and_link: $$@)
388388
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
389389

390+
$(3)/stage$(1)/test/rusttest-$(2)$$(X_$(2)): \
391+
$$(RUST_LIB) $$(RUST_INPUTS) \
392+
$$(SREQ$(1)_T_$(2)_H_$(3)) \
393+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTPKG_$(2)) \
394+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC_$(2)) \
395+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI_$(2)) \
396+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
397+
@$$(call E, compile_and_link: $$@)
398+
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
399+
390400
$(3)/stage$(1)/test/rustdoctest-$(2)$$(X_$(2)): \
391401
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
392402
$$(SREQ$(1)_T_$(2)_H_$(3)) \

branches/dist-snap/mk/tools.mk

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ RUSTDOC_INPUTS := $(wildcard $(addprefix $(S)src/librustdoc/, \
2828
RUSTI_LIB := $(S)src/librusti/rusti.rs
2929
RUSTI_INPUTS := $(wildcard $(S)src/librusti/*.rs)
3030

31+
# Rust, the convenience tool
32+
RUST_LIB := $(S)src/librust/rust.rs
33+
RUST_INPUTS := $(wildcard $(S)src/librust/*.rs)
34+
3135
# FIXME: These are only built for the host arch. Eventually we'll
3236
# have tools that need to built for other targets.
3337
define TOOLS_STAGE_N_TARGET
@@ -93,6 +97,27 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X_$(4)): \
9397
@$$(call E, compile_and_link: $$@)
9498
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rusti -o $$@ $$<
9599

100+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \
101+
$$(RUST_LIB) $$(RUST_INPUTS) \
102+
$$(SREQ$(1)_T_$(4)_H_$(3)) \
103+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \
104+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)) \
105+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)) \
106+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
107+
| $$(TLIB$(1)_T_$(4)_H_$(3))/
108+
@$$(call E, compile_and_link: $$@)
109+
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUST_GLOB_$(4)),$$(notdir $$@))
110+
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
111+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUST_GLOB_$(4)),$$(notdir $$@))
112+
113+
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X_$(4)): \
114+
$$(DRIVER_CRATE) \
115+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
116+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)) \
117+
| $$(TBIN$(1)_T_$(4)_H_$(3))/
118+
@$$(call E, compile_and_link: $$@)
119+
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rust -o $$@ $$<
120+
96121
endef
97122

98123
define TOOLS_STAGE_N_HOST
@@ -168,6 +193,27 @@ $$(HBIN$(2)_H_$(4))/rusti$$(X_$(4)): \
168193
@$$(call E, cp: $$@)
169194
$$(Q)cp $$< $$@
170195

196+
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUST_$(4)): \
197+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)) \
198+
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)) \
199+
$$(HSREQ$(2)_H_$(4)) \
200+
| $$(HLIB$(2)_H_$(4))/
201+
@$$(call E, cp: $$@)
202+
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUST_GLOB_$(4)),$$(notdir $$@))
203+
$$(Q)cp $$< $$@
204+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUST_GLOB_$(4)),$$(notdir $$@))
205+
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUST_GLOB_$(4)) \
206+
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUST_DSYM_GLOB)_$(4)) \
207+
$$(HLIB$(2)_H_$(4))
208+
209+
$$(HBIN$(2)_H_$(4))/rust$$(X_$(4)): \
210+
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X_$(4)) \
211+
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUST_$(4)) \
212+
$$(HSREQ$(2)_H_$(4)) \
213+
| $$(HBIN$(2)_H_$(4))/
214+
@$$(call E, cp: $$@)
215+
$$(Q)cp $$< $$@
216+
171217
endef
172218

173219
$(foreach host,$(CFG_HOST_TRIPLES), \

0 commit comments

Comments
 (0)