From 03f372d251a382df4d063d2f21b49b40ee42c7ff Mon Sep 17 00:00:00 2001 From: Jun Yuan Tan Date: Tue, 9 Nov 2021 10:50:47 +0800 Subject: [PATCH 25/34] clang: Switch defaults to dwarf-5 debug info on Linux GCC 11 has defaulted to DWARF-5 as well, this matches debug info formats, so mix and match of components with GCC 11 works. Rebased to LLVM 14.0.0 by Jun Yuan Tan Signed-off-by: Khem Raj Signed-off-by: Jun Yuan Tan --- clang/lib/Driver/ToolChains/Linux.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h index 169a37c44072..f432d36c0d17 100644 --- a/clang/lib/Driver/ToolChains/Linux.h +++ b/clang/lib/Driver/ToolChains/Linux.h @@ -61,6 +61,8 @@ public: const llvm::opt::ArgList &DriverArgs, const JobAction &JA, const llvm::fltSemantics *FPType = nullptr) const override; + unsigned GetDefaultDwarfVersion() const override { return 5; } + protected: Tool *buildAssembler() const override; Tool *buildLinker() const override; -- 2.33.1