mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Partially restore the fuzzer crate's build rules
Right now the stage1/fuzzer crate will build but it's not linked to librustc because stage1/librustc won't link.
This commit is contained in:
parent
77f5d14f14
commit
5fb9cad38d
@ -47,6 +47,7 @@ endif
|
||||
CFG_RUNTIME :=$(call CFG_LIB_NAME,rustrt)
|
||||
CFG_RUSTLLVM :=$(call CFG_LIB_NAME,rustllvm)
|
||||
CFG_STDLIB :=$(call CFG_LIB_NAME,std)
|
||||
CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc)
|
||||
|
||||
# version-string calculation
|
||||
CFG_GIT_DIR := $(CFG_SRC_DIR).git
|
||||
|
19
mk/fuzzer.mk
19
mk/fuzzer.mk
@ -1,19 +1,8 @@
|
||||
# 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.
|
||||
# At the moment the fuzzer only exists in stage1.
|
||||
|
||||
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 $@ $<
|
||||
|
||||
stage2/fuzzer$(X): stage2/fuzzer.o $(SREQ1)
|
||||
@$(call E, link [gcc]: $@)
|
||||
$(Q)gcc $(CFG_GCCISH_CFLAGS) rt/main.o 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) $@
|
||||
stage1/fuzzer$(X): $(FUZZER_CRATE) $(FUZZER_INPUTS) $(SREQ1)
|
||||
@$(call E, compile_and_link: $@)
|
||||
$(STAGE1) -o $@ $<
|
||||
|
@ -29,3 +29,8 @@ stage1/%.o: stage1/%.s
|
||||
stage1/%$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ0) stage0/intrinsics.bc
|
||||
@$(call E, compile_and_link: $@)
|
||||
$(STAGE0) -o $@ $<
|
||||
|
||||
stage1/lib/$(CFG_LIBRUSTC): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1) \
|
||||
stage1/intrinsics.bc
|
||||
@$(call E, compile_and_link: $@)
|
||||
$(STAGE1) --shared -o $@ $<
|
||||
|
@ -1,7 +1,6 @@
|
||||
// -*- rust -*-
|
||||
|
||||
use std;
|
||||
use rustc;
|
||||
|
||||
mod fuzzer;
|
||||
|
||||
|
@ -6,8 +6,6 @@ import std::getopts::opt_str;
|
||||
import std::io;
|
||||
import std::vec;
|
||||
|
||||
import rustc::front::ast;
|
||||
|
||||
type src_gen = iter() -> str;
|
||||
|
||||
iter dir_src_gen(str dir) -> str {
|
||||
|
Loading…
Reference in New Issue
Block a user