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.
This commit is contained in:
Martin Storsjö committed 2024-03-18 09:41:13 +00:00
1 parent 9c48a7d92c
commit 85c0ef1a21
1 file changed
+2 -4
+2 -4
View File
@@ -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