0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-12-01 13:18:54 +01:00
rust/mk/fuzzer.mk
Brian Anderson 9f9666af6e Tweak makefiles, change the way the fuzzer is built
Since librustc and the fuzzer depend on rustllvm, build them
like rustc, linking to libraries in lib instead of lib/rustc/$(target)
2011-09-29 22:58:34 -07:00

20 lines
707 B
Makefile

FUZZER_CRATE := $(S)src/fuzzer/fuzzer.rc
FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/fuzzer/, *.rs))
define FUZZ_STAGE_N
stage$(2)/bin/fuzzer$$(X): $$(FUZZER_CRATE) $$(FUZZER_INPUTS) \
$$(SREQ$(2)$(CFG_HOST_TRIPLE)) \
stage$(2)/lib/$$(CFG_RUNTIME) \
stage$(2)/lib/$$(CFG_RUSTLLVM) \
stage$(2)/lib/$$(CFG_STDLIB) \
stage$(2)/lib/$$(CFG_LIBRUSTC)
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)) -L stage1/lib -o $$@ $$<
endef
$(eval $(call FUZZ_STAGE_N,0,1))
$(eval $(call FUZZ_STAGE_N,1,2))
$(eval $(call FUZZ_STAGE_N,2,3))