Skip to content

Commit

Permalink
Tools should not be build prereqs of tests. Closes #3946
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Nov 14, 2012
1 parent 3e850c3 commit cf002e9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
29 changes: 18 additions & 11 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ HSREQ$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \
$$(HCORELIB_DEFAULT$(1)_H_$(3)) \
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
$$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \
$$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \
$$(MKFILE_DEPS)

Expand All @@ -350,17 +351,31 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a

# Prerequisites for complete stageN targets
# Prerequisites for a working stageN compiler and libraries
SREQ$(1)_T_$(2)_H_$(3) = \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB)

# Prerequisites for a working stageN compiler and libraries
CSREQ$(1)_T_$(2)_H_$(3) = \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(HBIN$(1)_H_$(3))/fuzzer$$(X) \
$$(HBIN$(1)_H_$(3))/cargo$$(X) \
$$(HBIN$(1)_H_$(3))/rustdoc$$(X) \
$$(HBIN$(1)_H_$(3))/rusti$$(X) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBCARGO) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCARGO) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI)

ifeq ($(1),0)
# Don't run the the stage0 compiler under valgrind - that ship has sailed
Expand Down Expand Up @@ -461,15 +476,7 @@ all: $(SREQ1$(CFG_HOST_TRIPLE)) $(GENERATED) docs

else

TSREQS := \
$(foreach target,$(CFG_TARGET_TRIPLES), \
$(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE)))
FUZZ := $(HBIN2_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
CARGO := $(HBIN2_H_$(CFG_HOST_TRIPLE))/cargo$(X)
RUSTDOC := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
RUSTI := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rusti$(X)

all: rustc $(GENERATED) docs $(FUZZ) $(CARGO) $(RUSTDOC) $(RUSTI)
all: $(CSREQ3$(CFG_HOST_TRIPLE)) $(GENERATED) docs

endif

Expand Down
4 changes: 2 additions & 2 deletions mk/install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PTR$(1)$(2) = $$(PREFIX_LIB)/rustc/$(1)
PTB$(1)$(2) = $$(PTR$(1)$(2))/bin
PTL$(1)$(2) = $$(PTR$(1)$(2))/$(CFG_LIBDIR)

install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
$$(Q)mkdir -p $$(PTL$(1)$(2))
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME))
$$(Q)$$(call INSTALL_LIB, \
Expand Down Expand Up @@ -74,7 +74,7 @@ PHB = $(PREFIX_BIN)
# Shorthand for the prefix bin directory
PHL = $(PREFIX_LIB)

install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
$(Q)mkdir -p $(PREFIX_BIN)
$(Q)mkdir -p $(PREFIX_LIB)
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1
Expand Down
3 changes: 2 additions & 1 deletion mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ $(3)/test/rustctest.stage$(1)-$(2)$$(X): \
$$(COMPILER_CRATE) \
$$(COMPILER_INPUTS) \
$$(SREQ$(1)_T_$(2)_H_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM)
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX)
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test

Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/qquote-1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// xfail-test Can't use syntax crate here

extern mod std;
extern mod syntax;
Expand Down

0 comments on commit cf002e9

Please sign in to comment.