summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-22 10:11:36 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-22 16:00:27 +0800
commitd6be60461c36f8a365fffb3ab601afbb2c92c0b8 (patch)
tree87bab044c85ac5af8c8a2e5c0e6173f82571423b
parentba518943ce1ee8cbdbb31aa803142393a74af0ba (diff)
downloadmrust-d6be60461c36f8a365fffb3ab601afbb2c92c0b8.tar.gz
Makefile - Rule to start compiling rustc itself
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 18f43f58..4b3643e8 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,8 @@ EXESUF ?=
CXX ?= g++
V ?= @
+.SUFFIXES:
+
# - Final stage for tests run as part of the rust_tests target.
# VALID OPTIONS: parse, expand, mir, ALL
RUST_TESTS_FINAL_STAGE ?= mir
@@ -136,6 +138,17 @@ output/libunwind.hir: $(call fcn_extcrate, core libc)
output/libtest.hir: $(call fcn_extcrate, std getopts term panic_unwind)
output/libgetopts.hir: output/libstd.hir
+output/librbml.hir: $(call fcn_extcrate, std serialize)
+output/librustc.hir: $(call fcn_extcrate, std arena flate fmt_macros graphviz rbml)
+
+output/rustc: $(RUSTCSRC)src/rustc/rustc.rs output/librustc.hir
+ @echo "--- [MRUSTC] $@"
+ @mkdir -p output/
+ @rm -f $@
+ $(DBG) $(BIN) $< -o $@ $(PIPECMD)
+# # HACK: Work around gdb returning success even if the program crashed
+ @test -e $@
+
$(RUSTCSRC): rust-nightly-date
@export DL_RUST_DATE=$$(cat rust-nightly-date); \
export DISK_RUST_DATE=$$([ -f $(RUSTC_SRC_DL) ] && cat $(RUSTC_SRC_DL)); \