diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 027f6e95..0d2a27c5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,8 @@ jobs: - run: make clean - run: make test_ci DEBUG=1 -j4 CXX=clang++ MCL_USE_XBYAK=0 MCL_USE_LLVM=0 - run: make clean + - run: make test_ci DEBUG=4 -j4 CXX=clang++ + - run: make clean # - run: make test_go # - run: sudo apt install openjdk-8-jdk # - run: make -C ffi/java test JAVA_INC=-I/usr/lib/jvm/java-8-openjdk-amd64/include diff --git a/common.mk b/common.mk index d63a544c..107d2897 100644 --- a/common.mk +++ b/common.mk @@ -82,25 +82,24 @@ RM=rm -rf DEBUG?=0 ifeq ($(DEBUG),1) ifeq ($(GCC_EXT),1) - CFLAGS+=-fsanitize=address - LDFLAGS+=-fsanitize=address + SANITIZE_OPT?=-fsanitize=address endif endif ifeq ($(DEBUG),2) ifeq ($(GCC_EXT),1) - CFLAGS+=-fsanitize=memory -fsanitize-memory-track-origins=2 - LDFLAGS+=-fsanitize=memory -fsanitize-memory-track-origins=2 + SANITIZE_OPT?=-fsanitize=memory -fsanitize-memory-track-origins=2 endif endif +ifeq ($(DEBUG),3) + # no option +endif ifeq ($(DEBUG),4) ifeq ($(GCC_EXT),1) - CFLAGS+=-fsanitize=undefined - LDFLAGS+=-fsanitize=undefined + SANITIZE_OPT?=-fsanitize=undefined -fno-sanitize-recover endif endif -ifeq ($(DEBUG),3) - # no option -endif +CFLAGS+=$(SANITIZE_OPT) +LDFLAGS+=$(SANITIZE_OPT) ifeq ($(DEBUG),0) CFLAGS_OPT+=-fomit-frame-pointer -DNDEBUG -fno-stack-protector ifeq ($(CXX),clang++)