Skip to content

Commit 8bde865

Browse files
committed
Merge pull request #1349 from lht/driver
Separate driver rustc and librustc
2 parents 96d7f83 + bc95ccb commit 8bde865

File tree

6 files changed

+634
-611
lines changed

6 files changed

+634
-611
lines changed

Makefile.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,11 @@ STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \
209209
######################################################################
210210

211211
COMPILER_CRATE := $(S)src/comp/rustc.rc
212-
COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/comp/, \
213-
rustc.rc *.rs */*.rs */*/*.rs))
212+
COMPILER_INPUTS := $(filter-out $(S)src/comp/driver/rustc.rs, \
213+
$(wildcard $(addprefix $(S)src/comp/, \
214+
rustc.rc *.rs */*.rs */*/*.rs)))
215+
216+
RUSTC_INPUTS := $(S)src/comp/driver/rustc.rs
214217

215218
######################################################################
216219
# LLVM macros

mk/perf.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
ifdef CFG_PERF_TOOL
33
rustc-perf$(X): $(CFG_HOST_TRIPLE)/stage2/bin/rustc$(X)
44
@$(call E, perf compile: $@)
5-
$(PERF_STAGE2_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) -o $@ $(COMPILER_CRATE) >rustc-perf.err 2>&1
6-
$(Q)rm -f $@
5+
$(PERF_STAGE2_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) --lib \
6+
-o $@ $(COMPILER_CRATE) >rustc-perf.err 2>&1
7+
$(Q)rm -f $(LIBRUSTC_GLOB)
78
else
89
rustc-perf$(X): $(CFG_HOST_TRIPLE)/stage2/bin/rustc$(X)
910
$(Q)touch $@

mk/target.mk

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,14 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM): \
4646
$$(Q)cp $$< $$@
4747

4848
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \
49-
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
50-
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
51-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
52-
$$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \
53-
$$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3))
49+
$$(RUSTC_INPUTS) \
50+
$$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3))
5451
@$$(call E, compile_and_link: $$@)
5552
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$<
5653

5754
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC): \
5855
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
59-
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
56+
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
6057
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
6158
$$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \
6259
$$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3))

0 commit comments

Comments
 (0)