From 4b537369ca9a6b2e70519059306b04bd643f90f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 1 Mar 2019 10:28:00 +0200 Subject: [PATCH] Add more proper references to dwarf issues on i686 --- wrappers/clang-target-wrapper.c | 13 ++++--------- wrappers/clang-target-wrapper.sh | 13 ++++--------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/wrappers/clang-target-wrapper.c b/wrappers/clang-target-wrapper.c index ae43810..2e8a61b 100644 --- a/wrappers/clang-target-wrapper.c +++ b/wrappers/clang-target-wrapper.c @@ -280,15 +280,10 @@ int _tmain(int argc, TCHAR* argv[]) { exec_argv[arg++] = _T("--driver-mode=g++"); if (!_tcscmp(arch, _T("i686"))) { - // Dwarf is the default for i686, but libunwind sometimes fails to - // to unwind correctly on i686. The issue can be reproduced with - // test/exception-locale.cpp. The issue might be related to - // DW_CFA_GNU_args_size, since it goes away if building - // libunwind/libcxxabi/libcxx and the test example with - // -mstack-alignment=16 -mstackrealign. (libunwind SVN r337312 fixed - // some handling relating to this dwarf opcode, which made - // test/hello-exception.cpp work properly, but apparently there are - // still issues with it). + // Dwarf is the default for i686, but there are a few issues with + // dwarf unwinding in code generated for i686, see + // https://bugs.llvm.org/show_bug.cgi?id=40012 and + // https://bugs.llvm.org/show_bug.cgi?id=40322. exec_argv[arg++] = _T("-fsjlj-exceptions"); } else if (!_tcscmp(arch, _T("x86_64"))) { // SEH is the default here. diff --git a/wrappers/clang-target-wrapper.sh b/wrappers/clang-target-wrapper.sh index 50badb2..528f52c 100755 --- a/wrappers/clang-target-wrapper.sh +++ b/wrappers/clang-target-wrapper.sh @@ -36,15 +36,10 @@ clang++|g++|c++) esac case $ARCH in i686) - # Dwarf is the default for i686, but libunwind sometimes fails to - # to unwind correctly on i686. The issue can be reproduced with - # test/exception-locale.cpp. The issue might be related to - # DW_CFA_GNU_args_size, since it goes away if building - # libunwind/libcxxabi/libcxx and the test example with - # -mstack-alignment=16 -mstackrealign. (libunwind SVN r337312 fixed - # some handling relating to this dwarf opcode, which made - # test/hello-exception.cpp work properly, but apparently there are - # still issues with it). + # Dwarf is the default for i686, but there are a few issues with + # dwarf unwinding in code generated for i686, see + # https://bugs.llvm.org/show_bug.cgi?id=40012 and + # https://bugs.llvm.org/show_bug.cgi?id=40322. FLAGS="$FLAGS -fsjlj-exceptions" ;; x86_64)