diff options
author | Prashanth Mundkur <prashanth.mundkur@gmail.com> | 2020-06-10 01:03:15 -0700 |
---|---|---|
committer | Prashanth Mundkur <prashanth.mundkur@gmail.com> | 2020-06-10 01:03:15 -0700 |
commit | 86bd287af50d296f3c83b7d0b524e3aaee073f78 (patch) | |
tree | 40b0a53366456a278797119ad2e51bcde37d9c78 /Makefile | |
parent | 6594b770016a11d0b358f9e022b7ebc91063a13a (diff) | |
download | sail-riscv-86bd287af50d296f3c83b7d0b524e3aaee073f78.zip sail-riscv-86bd287af50d296f3c83b7d0b524e3aaee073f78.tar.gz sail-riscv-86bd287af50d296f3c83b7d0b524e3aaee073f78.tar.bz2 |
Enable sailcov support in c_emulator if SAILCOV is set in the environment.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -146,6 +146,12 @@ else C_FLAGS += -O3 -flto endif +ifneq (,$(SAILCOV)) +C_FLAGS += -DSAILCOV +SAIL_FLAGS += -c_coverage -c_include sail_coverage.h +C_LIBS += $(SAIL_LIB_DIR)/coverage/libsail_coverage.a -lpthread -ldl +endif + RISCV_EXTRAS_LEM_FILES = riscv_extras.lem mem_metadata.lem riscv_extras_fdext.lem # Feature detect if we are on the latest development version of Sail # and use an updated lem file if so. This is just until the opam @@ -218,7 +224,7 @@ ocaml_emulator/tracecmp: ocaml_emulator/tracecmp.ml generated_definitions/c/riscv_model_$(ARCH).c: $(SAIL_SRCS) model/main.sail Makefile mkdir -p generated_definitions/c - $(SAIL) $(SAIL_FLAGS) -O -Oconstant_fold -memo_z3 -c -c_include riscv_prelude.h -c_include riscv_platform.h -c_no_main $(SAIL_SRCS) model/main.sail -o $(basename $@) + $(SAIL) $(SAIL_FLAGS) -O -Oconstant_fold -memo_z3 -c -c_include riscv_prelude.h -c_include riscv_platform.h -c_no_main $(SAIL_SRCS) model/main.sail -o $(basename $@) > generated_definitions/c/all_branches generated_definitions/c2/riscv_model_$(ARCH).c: $(SAIL_SRCS) model/main.sail Makefile mkdir -p generated_definitions/c2 |