summaryrefslogtreecommitdiff
path: root/run_rustc
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-11-22 08:33:01 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-11-22 08:33:01 +0800
commitf02a7a60510a6e84b446dbf85d2bb9b97119fd8a (patch)
treeda9fed2350ed78ebbecfa67a3480a932aaec0577 /run_rustc
parent74d40501cd27484f26cbbb920d441faec9007242 (diff)
downloadmrust-f02a7a60510a6e84b446dbf85d2bb9b97119fd8a.tar.gz
run_rustc - Update makefile to be able to build 1.19.0 libstd
Diffstat (limited to 'run_rustc')
-rw-r--r--run_rustc/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/run_rustc/Makefile b/run_rustc/Makefile
index 1dd3288f..19a87a38 100644
--- a/run_rustc/Makefile
+++ b/run_rustc/Makefile
@@ -12,28 +12,38 @@ V ?= @
all: $(LIBDIR)libstd.rlib $(BINDIR)hello_world
-RUSTFLAGS_output/liblibc.rlib := --cfg stdbuild
+RUSTFLAGS_liblibc := --cfg stdbuild
+RUSTFLAGS_libstd := -l dl -l rt -l pthread
+RUSTFLAGS_libunwind := -l gcc_s
$(RUSTC):
make -C ../ output/rustc -j 3
+../output/cargo:
+ make -C ../ output/cargo -j 3
$(BINDIR)rustc: $(RUSTC)
@mkdir -p $(dir $@)
$Vcp $@ $<
+$(BINDIR)cargo: ../output/cargo
+ @mkdir -p $(dir $@)
+ $Vcp $@ $<
+
+#$(LIBDIR)libstd.rlib: $(RUSTC) $(BINDIR)cargo
+# $(BINDIR)cargo
$(LIBDIR)%.rlib: $(RUST_SRC)%/lib.rs $(RUSTC)
@mkdir -p $(dir $@)
@echo "[RUSTC] -o $@"
- $Vtime $(DBG) $(RUSTC) $(RUSTFLAGS_$@) -L output/ -L ../output/libs $< -o $@
+ $Vtime $(DBG) $(RUSTC) $(RUSTFLAGS_$@) -L $(LIBDIR) -L ../output/libs $< -o $@ $(RUSTFLAGS_$*)
$(LIBDIR)%.rlib: $(RUST_SRC)%/src/lib.rs $(RUSTC)
@mkdir -p $(dir $@)
@echo "[RUSTC] -o $@"
- $Vtime $(DBG) $(RUSTC) $(RUSTFLAGS_$@) -L output/ -L ../output/libs $< -o $@
+ $Vtime $(DBG) $(RUSTC) $(RUSTFLAGS_$@) -L $(LIBDIR) -L ../output/libs $< -o $@ $(RUSTFLAGS_$*)
$(BINDIR)hello_world: $(RUST_SRC)test/run-pass/hello.rs $(LIBDIR)libstd.rlib $(RUSTC)
$Vmkdir -p $(dir $@)
@echo "[RUSTC] -o $@"
- $Vtime $(DBG) $(RUSTC) $(RUSTFLAGS_$@) -L output/ -L ../output/libs $< -o $@
+ $Vtime $(DBG) $(RUSTC) $(RUSTFLAGS_$@) -L $(LIBDIR) -L ../output/libs $< -o $@
fcn_extcrate = $(patsubst %,$(LIBDIR)lib%.rlib,$(1))