Skip to content

Commit

Permalink
Add a flag to run the compiler under valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed May 14, 2011
1 parent 0b73b29 commit cad8c73
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ endif
# platform-specific auto-configuration
include $(CFG_SRC_DIR)/mk/platform.mk

# Run the stage1/2 compilers under valgrind
ifdef VALGRIND_COMPILE
CFG_VALGRIND_COMPILE :=$(CFG_VALGRIND)
else
CFG_VALGRIND_COMPILE :=
endif

CFG_RUNTIME :=$(call CFG_LIB_NAME,rustrt)
CFG_RUSTLLVM :=$(call CFG_LIB_NAME,rustllvm)
CFG_STDLIB :=$(call CFG_LIB_NAME,std)
Expand Down Expand Up @@ -107,9 +114,11 @@ VPATH := $(S)doc $(S)src
STAGE0 := $(Q)$(call CFG_RUN_TARG,stage0,\
stage0/rustc$(X) $(CFG_RUSTC_FLAGS) -L stage1)
STAGE1 := $(Q)$(call CFG_RUN_TARG,stage1, \
stage1/rustc$(X) $(CFG_RUSTC_FLAGS) -L stage2)
$(CFG_VALGRIND_COMPILE) stage1/rustc$(X) \
$(CFG_RUSTC_FLAGS) -L stage2)
STAGE2 := $(Q)$(call CFG_RUN_TARG,stage2, \
stage2/rustc$(X) $(CFG_RUSTC_FLAGS) -L stage3)
$(CFG_VALGRIND_COMPILE) stage2/rustc$(X) \
$(CFG_RUSTC_FLAGS) -L stage3)

# "Source" files we generate in builddir along the way.
GENERATED :=
Expand Down

0 comments on commit cad8c73

Please sign in to comment.