From 22b1ff128bcfe7fd7672931486ad926a9d7b424b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 12 Oct 2022 12:32:07 +0300 Subject: [PATCH] Consistently use the --pdb= form in scripts Stop using the separate argument form (-Wl,-pdb,), and prefer using the option form with an implicit output name. --- Dockerfile.dev | 2 +- run-lldb-tests.sh | 2 +- run-tests.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index 2714dd1..11209ad 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -146,7 +146,7 @@ RUN cd test && \ ;; \ esac && \ for test in stacksmash; do \ - $arch-w64-mingw32-clang $test.c -o $arch/$test-asan.exe -fsanitize=address -g -gcodeview -Wl,-pdb,$arch/$test-asan.pdb || exit 1; \ + $arch-w64-mingw32-clang $test.c -o $arch/$test-asan.exe -fsanitize=address -g -gcodeview -Wl,--pdb= || exit 1; \ done; \ for test in ubsan; do \ $arch-w64-mingw32-clang $test.c -o $arch/$test.exe -fsanitize=undefined -fno-sanitize-recover=all || exit 1; \ diff --git a/run-lldb-tests.sh b/run-lldb-tests.sh index 9570d18..34110f3 100755 --- a/run-lldb-tests.sh +++ b/run-lldb-tests.sh @@ -45,7 +45,7 @@ mkdir -p $TEST_DIR $CXX hello-exception.cpp -o $TEST_DIR/hello-exception-dwarf.exe -g # Build an executable with PDB debug info -$CXX hello-exception.cpp -o $TEST_DIR/hello-exception-pdb.exe -g -gcodeview -Wl,-pdb= +$CXX hello-exception.cpp -o $TEST_DIR/hello-exception-pdb.exe -g -gcodeview -Wl,--pdb= # Strip the executable that uses pdb; the crt startup files and mingw static # library object files have dwarf debug info, so the binary has got a bit of # both, and lldb would choose to use the dwarf parts unless we strip it. diff --git a/run-tests.sh b/run-tests.sh index 757291a..171a751 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -231,7 +231,7 @@ for arch in $ARCHS; do i686|x86_64) ;; *) continue ;; esac - $arch-w64-mingw32-clang $test.c -o $TEST_DIR/$test-asan.exe -fsanitize=address -g -gcodeview -Wl,-pdb,$TEST_DIR/$test-asan.pdb + $arch-w64-mingw32-clang $test.c -o $TEST_DIR/$test-asan.exe -fsanitize=address -g -gcodeview -Wl,--pdb= # Only run these tests on native windows; asan doesn't run in wine. if [ -n "$NATIVE" ]; then TESTS_EXTRA="$TESTS_EXTRA $test-asan" @@ -239,7 +239,7 @@ for arch in $ARCHS; do fi if [ -n "$HAS_CFGUARD" ]; then # Smoke test ASAN with CFGuard to make sure it doesn't trip. - $arch-w64-mingw32-clang $test.c -o $TEST_DIR/$test-asan-cfguard.exe -fsanitize=address -g -gcodeview -Wl,-pdb,$TEST_DIR/$test-asan.pdb -mguard=cf + $arch-w64-mingw32-clang $test.c -o $TEST_DIR/$test-asan-cfguard.exe -fsanitize=address -g -gcodeview -Wl,--pdb= -mguard=cf if [ -n "$NATIVE" ]; then TESTS_EXTRA="$TESTS_EXTRA $test-asan-cfguard" FAILURE_TESTS="$FAILURE_TESTS $test-asan-cfguard"