aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-05-05 20:56:02 -0400
committerBrian Anderson <[email protected]>2011-05-10 21:31:14 -0400
commita5ea56c6f09c885d2bc9598419456c221ebb6831 (patch)
tree4d4c44131ab5a9dbb5ce3ac6268eeae5271f2d74
parentrustc: Don't interleave allocas with stores when copying arguments to allocas (diff)
downloadrust-a5ea56c6f09c885d2bc9598419456c221ebb6831.tar.xz
rust-a5ea56c6f09c885d2bc9598419456c221ebb6831.zip
Introduce the fuzzer crate and make rules
-rw-r--r--Makefile.in1
-rw-r--r--mk/fuzzer.mk10
-rw-r--r--src/fuzzer/Fuzzer.rs2
-rw-r--r--src/fuzzer/fuzzer.rc13
4 files changed, 26 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 534293d0..7bb89ebe 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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
diff --git a/mk/fuzzer.mk b/mk/fuzzer.mk
new file mode 100644
index 00000000..d07db91a
--- /dev/null
+++ b/mk/fuzzer.mk
@@ -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 $@ $<
diff --git a/src/fuzzer/Fuzzer.rs b/src/fuzzer/Fuzzer.rs
new file mode 100644
index 00000000..ea3850b2
--- /dev/null
+++ b/src/fuzzer/Fuzzer.rs
@@ -0,0 +1,2 @@
+fn main() {
+} \ No newline at end of file
diff --git a/src/fuzzer/fuzzer.rc b/src/fuzzer/fuzzer.rc
new file mode 100644
index 00000000..2f0758bf
--- /dev/null
+++ b/src/fuzzer/fuzzer.rc
@@ -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: