File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ prefix=/usr/local
50
50
# CONFIG_ASAN=y
51
51
# use memory sanitizer
52
52
# CONFIG_MSAN=y
53
+ # use UB sanitizer
54
+ # CONFIG_UBSAN=y
53
55
# include the code for BigInt/BigFloat/BigDecimal and math mode
54
56
CONFIG_BIGNUM =y
55
57
@@ -133,6 +135,10 @@ ifdef CONFIG_MSAN
133
135
CFLAGS+=-fsanitize =memory -fno-omit-frame-pointer
134
136
LDFLAGS+=-fsanitize =memory -fno-omit-frame-pointer
135
137
endif
138
+ ifdef CONFIG_UBSAN
139
+ CFLAGS+=-fsanitize =undefined -fno-omit-frame-pointer
140
+ LDFLAGS+=-fsanitize =undefined -fno-omit-frame-pointer
141
+ endif
136
142
ifdef CONFIG_WIN32
137
143
LDEXPORT =
138
144
else
@@ -163,13 +169,15 @@ endif
163
169
ifeq ($(CROSS_PREFIX ) ,)
164
170
ifndef CONFIG_ASAN
165
171
ifndef CONFIG_MSAN
172
+ ifndef CONFIG_UBSAN
166
173
PROGS+ =examples/hello examples/hello_module examples/test_fib
167
174
ifndef CONFIG_DARWIN
168
175
PROGS+ =examples/fib.so examples/point.so
169
176
endif
170
177
endif
171
178
endif
172
179
endif
180
+ endif
173
181
174
182
all : $(OBJDIR ) $(OBJDIR ) /quickjs.check.o $(OBJDIR ) /qjs.check.o $(PROGS )
175
183
You can’t perform that action at this time.
0 commit comments