File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 73
73
run : |
74
74
make ENABLE_UBSAN=1 clean check
75
75
make ENABLE_JIT=1 ENABLE_UBSAN=1 clean check
76
+ - name : valgrind check (without JIT)
77
+ run : |
78
+ make clean
79
+ make ENABLE_JIT=0 ENABLE_VALGRIND=1
80
+ valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 ./build/rv32emu ./build/hello.elf
81
+ valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 ./build/rv32emu ./build/aes.elf
82
+ - name : valgrind check (with JIT)
83
+ run : |
84
+ make clean
85
+ make ENABLE_JIT=1 ENABLE_VALGRIND=1
86
+ valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 ./build/rv32emu ./build/hello.elf
87
+ valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 ./build/rv32emu ./build/aes.elf
76
88
77
89
host-arm64 :
78
90
needs : [detect-code-related-file-changes]
Original file line number Diff line number Diff line change @@ -11,6 +11,14 @@ CFLAGS = -std=gnu99 -O2 -Wall -Wextra
11
11
CFLAGS += -Wno-unused-label
12
12
CFLAGS += -include src/common.h
13
13
14
+ ENABLE_VALGRIND ?= 0
15
+ ifeq ("$(ENABLE_UBSAN ) ", "1")
16
+ # according to gcc's man page: "If you use multiple -O options, with or without level numbers, the last such option is the one that is effective."
17
+ # In order to use Valgrind, we need to compile with -g
18
+ CFLAGS += -g
19
+ LDFLAGS += -g
20
+ endif
21
+
14
22
# Enable link-time optimization (LTO)
15
23
ENABLE_LTO ?= 1
16
24
ifeq ($(call has, LTO) , 1)
You can’t perform that action at this time.
0 commit comments