Introduce the fuzzer crate and make rules

This commit is contained in:
Brian Anderson 2011-05-05 20:56:02 -04:00
parent f627c2ff21
commit a5ea56c6f0
4 changed files with 26 additions and 0 deletions

View File

@ -211,3 +211,4 @@ include $(CFG_SRC_DIR)/mk/dist.mk
include $(CFG_SRC_DIR)/mk/snap.mk
include $(CFG_SRC_DIR)/mk/clean.mk
include $(CFG_SRC_DIR)/mk/autodep.mk
include $(CFG_SRC_DIR)/mk/fuzzer.mk

10
mk/fuzzer.mk Normal file
View File

@ -0,0 +1,10 @@
# At the moment the fuzzer only exists in stage2. That's the first
# stage built by the non-snapshot compiler so it seems a convenient
# stage to work at.
FUZZER_CRATE := $(S)src/fuzzer/fuzzer.rc
FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/fuzzer/, *.rs))
stage2/fuzzer.o: $(FUZZER_CRATE) $(FUZZER_INPUTS) $(SREQ1)
@$(call E, compile: $@)
$(STAGE1) -c -o $@ $<

2
src/fuzzer/Fuzzer.rs Normal file
View File

@ -0,0 +1,2 @@
fn main() {
}

13
src/fuzzer/fuzzer.rc Normal file
View File

@ -0,0 +1,13 @@
// -*- rust -*-
use std;
mod Fuzzer;
// Local Variables:
// fill-column: 78;
// indent-tabs-mode: nil
// c-basic-offset: 4
// buffer-file-coding-system: utf-8-unix
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
// End: