Skip to content

Commit e384109

Browse files
committed
wrappers: Force the default dwarf version back to 4
Clang's general default dwarf version was raised from 4 to 5 in d3b26dea16108c427b19b5480c9edc76edf8f5b4 in llvm-project (Jan 23 2022) before the 14.0.0 branch, but dwarf 5 on Windows seems to not work with either LLDB or GDB. Thus force the default back to 4 here as a temporary workaround, and try to set the default back to 4 for mingw targets in Clang for later releases (https://reviews.llvm.org/D119326).
1 parent 977df0d commit e384109

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

wrappers/clang-target-wrapper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ int _tmain(int argc, TCHAR* argv[]) {
9595
exec_argv[arg++] = _T("-unwindlib=libunwind");
9696
exec_argv[arg++] = _T("-stdlib=libc++");
9797
exec_argv[arg++] = _T("-fuse-ld=lld");
98+
exec_argv[arg++] = _T("-fdebug-default-version=4");
9899
exec_argv[arg++] = _T("--end-no-unused-arguments");
99100

100101
for (int i = 1; i < argc; i++)

wrappers/clang-target-wrapper.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ FLAGS="$FLAGS -rtlib=compiler-rt"
8888
FLAGS="$FLAGS -unwindlib=libunwind"
8989
FLAGS="$FLAGS -stdlib=libc++"
9090
FLAGS="$FLAGS -fuse-ld=lld"
91+
FLAGS="$FLAGS -fdebug-default-version=4"
9192
FLAGS="$FLAGS --end-no-unused-arguments"
9293

9394
$CCACHE "$CLANG" $FLAGS "$@"

0 commit comments

Comments
 (0)