Link fuzzer to the rustc crate
This commit is contained in:
parent
a8e8585fbc
commit
aa40d61d5d
12
mk/fuzzer.mk
12
mk/fuzzer.mk
@ -5,6 +5,16 @@
|
||||
FUZZER_CRATE := $(S)src/fuzzer/fuzzer.rc
|
||||
FUZZER_INPUTS := $(wildcard $(addprefix $(S)src/fuzzer/, *.rs))
|
||||
|
||||
stage2/fuzzer.o: $(FUZZER_CRATE) $(FUZZER_INPUTS) $(SREQ1)
|
||||
stage2/fuzzer.o: $(FUZZER_CRATE) $(FUZZER_INPUTS) $(SREQ1) \
|
||||
stage2/$(CFG_RUSTCLIB)
|
||||
@$(call E, compile: $@)
|
||||
$(STAGE1) -c -o $@ $<
|
||||
|
||||
stage2/fuzzer$(X): stage2/fuzzer.o $(SREQ1)
|
||||
@$(call E, link [gcc]: $@)
|
||||
$(Q)gcc $(CFG_GCC_CFLAGS) stage2/glue.o -o $@ $< \
|
||||
-Lstage2 -Lrustllvm -Lrt -lrustrt -lrustllvm -lstd -lm -lrustc
|
||||
@# dsymutil sometimes fails or prints a warning, but the
|
||||
@# program still runs. Since it simplifies debugging other
|
||||
@# programs, I\'ll live with the noise.
|
||||
-$(Q)$(CFG_DSYMUTIL) $@
|
||||
|
@ -1,2 +1,3 @@
|
||||
fn main() {
|
||||
fn main(vec[str] args) {
|
||||
rustc.driver.rustc.main(args);
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
// -*- rust -*-
|
||||
|
||||
use std;
|
||||
use rustc;
|
||||
|
||||
mod Fuzzer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user