From 85c0ef1a2170eae70797a3ce75639bccb012d2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 18 Mar 2024 09:38:56 +0000 Subject: [PATCH] test: Don't build asan/ubsan tests with PDB debug info The DWARF debug info should work just as well. Since 8c03f400a837dc9333e54ab371e7904aa2bec43c in llvm-project, llvm-symbolizer prefers DWARF over PDB if there is a DWARF section in the inspected executable. Thus, in order to use PDB, one would have to strip out any remnants of DWARF debug info from the executable, like in run-lldb-tests.sh (e.g. by -Wl,-s). For the purposes of this test, simplifying the setup to use DWARF works just as well. --- test/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/Makefile b/test/Makefile index 91d8056..46bb34a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -143,8 +143,6 @@ EXTRAFILES = \ $(addprefix lib, $(addsuffix .dll.a, $(TESTS_CPP_DLL))) \ $(addsuffix .h, $(TESTS_IDL)) \ $(addsuffix -rc.o, $(TESTS_RES)) \ - $(addsuffix -asan.pdb, $(TESTS_ASAN)) \ - $(addsuffix -asan-cfguard.pdb, $(TESTS_ASAN_CFGUARD)) all: $(TARGETS) @@ -187,14 +185,14 @@ $(TARGETS_FORTIFY): %-fortify$(EXEEXT): %.c $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ -O2 -D_FORTIFY_SOURCE=2 $(TARGETS_ASAN): %-asan$(EXEEXT): %.c - $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ -fsanitize=address -g -gcodeview -Wl,--pdb= + $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ -fsanitize=address -g $(TARGETS_UBSAN): %$(EXEEXT): %.c $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ -fsanitize=undefined -fno-sanitize-recover=all # Smoke test ASAN with CFGuard to make sure it doesn't trip. $(TARGETS_ASAN_CFGUARD): %-asan-cfguard$(EXEEXT): %.c - $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ -fsanitize=address -g -gcodeview -mguard=cf -Wl,--pdb= + $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ -fsanitize=address -g -mguard=cf $(TARGETS_OMP): %$(EXEEXT): %.c $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ -fopenmp=libomp