Rename src/rustc to src/librustc. Use the driver crate
This commit is contained in:
parent
f72ef31ede
commit
69a8b4d8e2
|
@ -216,16 +216,15 @@ STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \
|
|||
# rustc crate variables
|
||||
######################################################################
|
||||
|
||||
COMPILER_CRATE := $(S)src/rustc/rustc.rc
|
||||
COMPILER_INPUTS := $(filter-out $(S)src/rustc/driver/rustc.rs, \
|
||||
$(wildcard $(addprefix $(S)src/rustc/, \
|
||||
rustc.rc *.rs */*.rs */*/*.rs */*/*/*.rs)))
|
||||
COMPILER_CRATE := $(S)src/librustc/rustc.rc
|
||||
COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/librustc/, \
|
||||
rustc.rc *.rs */*.rs */*/*.rs */*/*/*.rs))
|
||||
|
||||
LIBSYNTAX_CRATE := $(S)src/libsyntax/syntax.rc
|
||||
LIBSYNTAX_INPUTS := $(wildcard $(addprefix $(S)src/libsyntax/, \
|
||||
syntax.rc *.rs */*.rs */*/*.rs))
|
||||
|
||||
RUSTC_INPUTS := $(S)src/rustc/driver/rustc.rs
|
||||
DRIVER_CRATE := $(S)src/driver/driver.rs
|
||||
|
||||
######################################################################
|
||||
# LLVM macros
|
||||
|
|
20
mk/target.mk
20
mk/target.mk
|
@ -24,22 +24,22 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM): \
|
|||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \
|
||||
$$(RUSTC_INPUTS) \
|
||||
$$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$<
|
||||
ifdef CFG_ENABLE_PAX_FLAGS
|
||||
@$$(call E, apply PaX flags: $$@)
|
||||
@"$(CFG_PAXCTL)" -cm "$$@"
|
||||
endif
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC): \
|
||||
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX)
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) --cfg rustc -o $$@ $$<
|
||||
ifdef CFG_ENABLE_PAX_FLAGS
|
||||
@$$(call E, apply PaX flags: $$@)
|
||||
@"$(CFG_PAXCTL)" -cm "$$@"
|
||||
endif
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX): \
|
||||
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
|
||||
|
|
10
mk/tools.mk
10
mk/tools.mk
|
@ -1,8 +1,6 @@
|
|||
# Rules for non-core tools built with the compiler, both for target
|
||||
# and host architectures
|
||||
|
||||
TOOL_DRIVER := $(S)src/driver/driver.rs
|
||||
|
||||
FUZZER_LIB := $(S)src/libfuzzer/fuzzer.rc
|
||||
FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/libfuzzer/, *.rs))
|
||||
|
||||
|
@ -36,7 +34,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBFUZZER): \
|
|||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X): \
|
||||
$$(TOOL_DRIVER) \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBFUZZER)
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg fuzzer -o $$@ $$<
|
||||
|
@ -82,7 +80,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO): \
|
|||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/cargo$$(X): \
|
||||
$$(TOOL_DRIVER) \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCARGO)
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg cargo -o $$@ $$<
|
||||
|
@ -111,7 +109,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC): \
|
|||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X): \
|
||||
$$(TOOL_DRIVER) \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC)
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustdoc -o $$@ $$<
|
||||
|
@ -140,7 +138,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTI): \
|
|||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X): \
|
||||
$$(TOOL_DRIVER) \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTI)
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rusti -o $$@ $$<
|
||||
|
|
|
@ -13,4 +13,7 @@ extern mod self(name = "rustdoc", vers = "0.5");
|
|||
#[cfg(rusti)]
|
||||
extern mod self(name = "rusti", vers = "0.5");
|
||||
|
||||
#[cfg(rustc)]
|
||||
extern mod self(name = "rustc", vers = "0.5");
|
||||
|
||||
fn main() { self::main() }
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue