[PATCH] D70191: [AMDGPU][HIP] Change default DWARF version to 4
Scott Linder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 13 09:56:43 PST 2019
scott.linder created this revision.
Herald added subscribers: cfe-commits, t-tye, tpr, dstuttard, aprantl, yaxunl, nhaehnle, wdng, jvesely, kzhuravl.
Herald added a project: clang.
Tooling around DWARF 5 is still not mature enough for this to be a sane
default, and the AMDGPU and HIP toolchains should agree on a single
default.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70191
Files:
clang/lib/Driver/ToolChains/AMDGPU.h
clang/lib/Driver/ToolChains/HIP.h
clang/test/Driver/amdgpu-toolchain.c
clang/test/Driver/hip-toolchain-dwarf.hip
Index: clang/test/Driver/hip-toolchain-dwarf.hip
===================================================================
--- /dev/null
+++ clang/test/Driver/hip-toolchain-dwarf.hip
@@ -0,0 +1,9 @@
+// REQUIRES: clang-driver
+// REQUIRES: x86-registered-target
+// REQUIRES: amdgpu-registered-target
+
+// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
+// RUN: -x hip --cuda-gpu-arch=gfx803 %s \
+// RUN: -Xarch_gfx803 -g 2>&1 | FileCheck %s -check-prefix=DWARF_VER
+
+// DWARF_VER: "-dwarf-version=4"
Index: clang/test/Driver/amdgpu-toolchain.c
===================================================================
--- clang/test/Driver/amdgpu-toolchain.c
+++ clang/test/Driver/amdgpu-toolchain.c
@@ -8,4 +8,4 @@
// AS_LINK: clang{{.*}} "-cc1as"
// AS_LINK: ld.lld{{.*}} "-shared"
-// DWARF_VER: "-dwarf-version=5"
+// DWARF_VER: "-dwarf-version=4"
Index: clang/lib/Driver/ToolChains/HIP.h
===================================================================
--- clang/lib/Driver/ToolChains/HIP.h
+++ clang/lib/Driver/ToolChains/HIP.h
@@ -113,7 +113,7 @@
computeMSVCVersion(const Driver *D,
const llvm::opt::ArgList &Args) const override;
- unsigned GetDefaultDwarfVersion() const override { return 2; }
+ unsigned GetDefaultDwarfVersion() const override { return 4; }
const ToolChain &HostTC;
Index: clang/lib/Driver/ToolChains/AMDGPU.h
===================================================================
--- clang/lib/Driver/ToolChains/AMDGPU.h
+++ clang/lib/Driver/ToolChains/AMDGPU.h
@@ -55,7 +55,7 @@
public:
AMDGPUToolChain(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args);
- unsigned GetDefaultDwarfVersion() const override { return 5; }
+ unsigned GetDefaultDwarfVersion() const override { return 4; }
bool IsIntegratedAssemblerDefault() const override { return true; }
bool IsMathErrnoDefault() const override { return false; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70191.229128.patch
Type: text/x-patch
Size: 1946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191113/969b0d43/attachment-0001.bin>
More information about the cfe-commits
mailing list