Re: [clang] d3b26de - Clang: Change the default DWARF version to 5
Oh, sorry, I see you are zmodem... yay for getting used to more usernames - thanks for the workaround :) On Mon, Jan 24, 2022 at 3:05 PM David Blaikie wrote: > Looks like that got addressed/worked around with > https://github.com/llvm/llvm-project/commit/38e16e1cebb891ad47b85727bf46f7dac6d7da94 > > I'll look into it further once I've cleaned up other live fallout. > > On Mon, Jan 24, 2022 at 10:01 AM Hans Wennborg wrote: > >> For me, this broke some tests of the profiling runtime: >> >> $ ninja check-profile >> ... >> Failed Tests (2): >> Profile-i386 :: Linux/instrprof-debug-info-correlate.c >> Profile-x86_64 :: Linux/instrprof-debug-info-correlate.c >> >> Annoyingly, I can't find any buildbots where this fails, but I'm not >> really sure which ones test this runtime. >> >> It also reproduces on Chromium's builders, e.g. >> >> https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8824141369391584977/+/u/package_clang/stdout >> >> Filed https://github.com/llvm/llvm-project/issues/53387 >> >> >> On Mon, Jan 24, 2022 at 5:50 AM David Blaikie via cfe-commits >> wrote: >> > >> > >> > Author: David Blaikie >> > Date: 2022-01-23T20:49:57-08:00 >> > New Revision: d3b26dea16108c427b19b5480c9edc76edf8f5b4 >> > >> > URL: >> https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4 >> > DIFF: >> https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4.diff >> > >> > LOG: Clang: Change the default DWARF version to 5 >> > >> > (except on platforms that already opt in to specific versions - SCE, >> > Android, and Darwin using DWARFv4 explicitly, for instance) >> > >> > Added: >> > >> > >> > Modified: >> > clang/docs/ReleaseNotes.rst >> > clang/include/clang/Driver/ToolChain.h >> > clang/lib/Driver/ToolChains/Linux.h >> > clang/test/CodeGen/debug-info-extern-call.c >> > clang/test/CodeGen/dwarf-version.c >> > clang/test/Driver/cl-options.c >> > clang/test/Driver/clang-g-opts.c >> > clang/test/Driver/ve-toolchain.c >> > clang/test/Driver/ve-toolchain.cpp >> > >> > Removed: >> > >> > >> > >> > >> >> > diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst >> > index 2eec63901932e..4fe037741256f 100644 >> > --- a/clang/docs/ReleaseNotes.rst >> > +++ b/clang/docs/ReleaseNotes.rst >> > @@ -252,6 +252,14 @@ X86 Support in Clang >> > >> > - Support for ``AVX512-FP16`` instructions has been added. >> > >> > +DWARF Support in Clang >> > +-- >> > + >> > +- The default DWARF version has increased from DWARFv4 to DWARFv5. >> You can opt >> > + back in to the old behavior with -gdwarf-4. Some platforms (Darwin, >> Android, >> > + and SCE for instance) already opt out of this version bump as is >> suitable for >> > + the platform >> > + >> > Arm and AArch64 Support in Clang >> > >> > >> > >> > diff --git a/clang/include/clang/Driver/ToolChain.h >> b/clang/include/clang/Driver/ToolChain.h >> > index eb95806a2f75d..37011de6bd6d7 100644 >> > --- a/clang/include/clang/Driver/ToolChain.h >> > +++ b/clang/include/clang/Driver/ToolChain.h >> > @@ -510,7 +510,7 @@ class ToolChain { >> > >> >// Return the DWARF version to emit, in the absence of arguments >> >// to the contrary. >> > - virtual unsigned GetDefaultDwarfVersion() const { return 4; } >> > + virtual unsigned GetDefaultDwarfVersion() const { return 5; } >> > >> >// Some toolchains may have >> > diff erent restrictions on the DWARF version and >> >// may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even >> when host >> > >> > diff --git a/clang/lib/Driver/ToolChains/Linux.h >> b/clang/lib/Driver/ToolChains/Linux.h >> > index a5ec33bd44f10..a5648d79d655f 100644 >> > --- a/clang/lib/Driver/ToolChains/Linux.h >> > +++ b/clang/lib/Driver/ToolChains/Linux.h >> > @@ -40,6 +40,7 @@ class LLVM_LIBRARY_VISIBILITY Linux : public >> Generic_ELF { >> >void AddIAMCUIncludeArgs(const llvm::opt::ArgList , >> > llvm::opt::ArgStringList ) const >> override; >> >RuntimeLibType GetDefaultRuntimeLibType() const override; >> > + unsigned GetDefaultDwarfVersion() const override; >> >CXXStdlibType GetDefaultCXXStdlibType() const override; >> >bool >> >IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList ) const >> override; >> > >> > diff --git a/clang/test/CodeGen/debug-info-extern-call.c >> b/clang/test/CodeGen/debug-info-extern-call.c >> > index 7cf90550ac00a..fad52d0df0b3f 100644 >> > --- a/clang/test/CodeGen/debug-info-extern-call.c >> > +++ b/clang/test/CodeGen/debug-info-extern-call.c >> > @@ -12,13 +12,13 @@ >> > // decls so that the dwarf generator can describe information needed >> for tail >> > // call frame reconstrution. >> > // >> > -// RUN: %clang -g -O2 -target x86_64-none-linux-gnu -ggdb -S >> -emit-llvm %s -o - \ >> > +// RUN: %clang
Re: [clang] d3b26de - Clang: Change the default DWARF version to 5
Looks like that got addressed/worked around with https://github.com/llvm/llvm-project/commit/38e16e1cebb891ad47b85727bf46f7dac6d7da94 I'll look into it further once I've cleaned up other live fallout. On Mon, Jan 24, 2022 at 10:01 AM Hans Wennborg wrote: > For me, this broke some tests of the profiling runtime: > > $ ninja check-profile > ... > Failed Tests (2): > Profile-i386 :: Linux/instrprof-debug-info-correlate.c > Profile-x86_64 :: Linux/instrprof-debug-info-correlate.c > > Annoyingly, I can't find any buildbots where this fails, but I'm not > really sure which ones test this runtime. > > It also reproduces on Chromium's builders, e.g. > > https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8824141369391584977/+/u/package_clang/stdout > > Filed https://github.com/llvm/llvm-project/issues/53387 > > > On Mon, Jan 24, 2022 at 5:50 AM David Blaikie via cfe-commits > wrote: > > > > > > Author: David Blaikie > > Date: 2022-01-23T20:49:57-08:00 > > New Revision: d3b26dea16108c427b19b5480c9edc76edf8f5b4 > > > > URL: > https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4 > > DIFF: > https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4.diff > > > > LOG: Clang: Change the default DWARF version to 5 > > > > (except on platforms that already opt in to specific versions - SCE, > > Android, and Darwin using DWARFv4 explicitly, for instance) > > > > Added: > > > > > > Modified: > > clang/docs/ReleaseNotes.rst > > clang/include/clang/Driver/ToolChain.h > > clang/lib/Driver/ToolChains/Linux.h > > clang/test/CodeGen/debug-info-extern-call.c > > clang/test/CodeGen/dwarf-version.c > > clang/test/Driver/cl-options.c > > clang/test/Driver/clang-g-opts.c > > clang/test/Driver/ve-toolchain.c > > clang/test/Driver/ve-toolchain.cpp > > > > Removed: > > > > > > > > > > > diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst > > index 2eec63901932e..4fe037741256f 100644 > > --- a/clang/docs/ReleaseNotes.rst > > +++ b/clang/docs/ReleaseNotes.rst > > @@ -252,6 +252,14 @@ X86 Support in Clang > > > > - Support for ``AVX512-FP16`` instructions has been added. > > > > +DWARF Support in Clang > > +-- > > + > > +- The default DWARF version has increased from DWARFv4 to DWARFv5. You > can opt > > + back in to the old behavior with -gdwarf-4. Some platforms (Darwin, > Android, > > + and SCE for instance) already opt out of this version bump as is > suitable for > > + the platform > > + > > Arm and AArch64 Support in Clang > > > > > > > > diff --git a/clang/include/clang/Driver/ToolChain.h > b/clang/include/clang/Driver/ToolChain.h > > index eb95806a2f75d..37011de6bd6d7 100644 > > --- a/clang/include/clang/Driver/ToolChain.h > > +++ b/clang/include/clang/Driver/ToolChain.h > > @@ -510,7 +510,7 @@ class ToolChain { > > > >// Return the DWARF version to emit, in the absence of arguments > >// to the contrary. > > - virtual unsigned GetDefaultDwarfVersion() const { return 4; } > > + virtual unsigned GetDefaultDwarfVersion() const { return 5; } > > > >// Some toolchains may have > > diff erent restrictions on the DWARF version and > >// may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even > when host > > > > diff --git a/clang/lib/Driver/ToolChains/Linux.h > b/clang/lib/Driver/ToolChains/Linux.h > > index a5ec33bd44f10..a5648d79d655f 100644 > > --- a/clang/lib/Driver/ToolChains/Linux.h > > +++ b/clang/lib/Driver/ToolChains/Linux.h > > @@ -40,6 +40,7 @@ class LLVM_LIBRARY_VISIBILITY Linux : public > Generic_ELF { > >void AddIAMCUIncludeArgs(const llvm::opt::ArgList , > > llvm::opt::ArgStringList ) const > override; > >RuntimeLibType GetDefaultRuntimeLibType() const override; > > + unsigned GetDefaultDwarfVersion() const override; > >CXXStdlibType GetDefaultCXXStdlibType() const override; > >bool > >IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList ) const > override; > > > > diff --git a/clang/test/CodeGen/debug-info-extern-call.c > b/clang/test/CodeGen/debug-info-extern-call.c > > index 7cf90550ac00a..fad52d0df0b3f 100644 > > --- a/clang/test/CodeGen/debug-info-extern-call.c > > +++ b/clang/test/CodeGen/debug-info-extern-call.c > > @@ -12,13 +12,13 @@ > > // decls so that the dwarf generator can describe information needed > for tail > > // call frame reconstrution. > > // > > -// RUN: %clang -g -O2 -target x86_64-none-linux-gnu -ggdb -S -emit-llvm > %s -o - \ > > +// RUN: %clang -gdwarf-4 -O2 -target x86_64-none-linux-gnu -ggdb -S > -emit-llvm %s -o - \ > > // RUN: | FileCheck %s -check-prefix=DECLS-FOR-EXTERN > > // > > // Do not emit a subprogram for extern decls when entry values are > disabled and > > // the tuning is not set to gdb. > > // > > -// RUN: %clang
Re: [clang] d3b26de - Clang: Change the default DWARF version to 5
For me, this broke some tests of the profiling runtime: $ ninja check-profile ... Failed Tests (2): Profile-i386 :: Linux/instrprof-debug-info-correlate.c Profile-x86_64 :: Linux/instrprof-debug-info-correlate.c Annoyingly, I can't find any buildbots where this fails, but I'm not really sure which ones test this runtime. It also reproduces on Chromium's builders, e.g. https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8824141369391584977/+/u/package_clang/stdout Filed https://github.com/llvm/llvm-project/issues/53387 On Mon, Jan 24, 2022 at 5:50 AM David Blaikie via cfe-commits wrote: > > > Author: David Blaikie > Date: 2022-01-23T20:49:57-08:00 > New Revision: d3b26dea16108c427b19b5480c9edc76edf8f5b4 > > URL: > https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4 > DIFF: > https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4.diff > > LOG: Clang: Change the default DWARF version to 5 > > (except on platforms that already opt in to specific versions - SCE, > Android, and Darwin using DWARFv4 explicitly, for instance) > > Added: > > > Modified: > clang/docs/ReleaseNotes.rst > clang/include/clang/Driver/ToolChain.h > clang/lib/Driver/ToolChains/Linux.h > clang/test/CodeGen/debug-info-extern-call.c > clang/test/CodeGen/dwarf-version.c > clang/test/Driver/cl-options.c > clang/test/Driver/clang-g-opts.c > clang/test/Driver/ve-toolchain.c > clang/test/Driver/ve-toolchain.cpp > > Removed: > > > > > diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst > index 2eec63901932e..4fe037741256f 100644 > --- a/clang/docs/ReleaseNotes.rst > +++ b/clang/docs/ReleaseNotes.rst > @@ -252,6 +252,14 @@ X86 Support in Clang > > - Support for ``AVX512-FP16`` instructions has been added. > > +DWARF Support in Clang > +-- > + > +- The default DWARF version has increased from DWARFv4 to DWARFv5. You can > opt > + back in to the old behavior with -gdwarf-4. Some platforms (Darwin, > Android, > + and SCE for instance) already opt out of this version bump as is suitable > for > + the platform > + > Arm and AArch64 Support in Clang > > > > diff --git a/clang/include/clang/Driver/ToolChain.h > b/clang/include/clang/Driver/ToolChain.h > index eb95806a2f75d..37011de6bd6d7 100644 > --- a/clang/include/clang/Driver/ToolChain.h > +++ b/clang/include/clang/Driver/ToolChain.h > @@ -510,7 +510,7 @@ class ToolChain { > >// Return the DWARF version to emit, in the absence of arguments >// to the contrary. > - virtual unsigned GetDefaultDwarfVersion() const { return 4; } > + virtual unsigned GetDefaultDwarfVersion() const { return 5; } > >// Some toolchains may have > diff erent restrictions on the DWARF version and >// may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when > host > > diff --git a/clang/lib/Driver/ToolChains/Linux.h > b/clang/lib/Driver/ToolChains/Linux.h > index a5ec33bd44f10..a5648d79d655f 100644 > --- a/clang/lib/Driver/ToolChains/Linux.h > +++ b/clang/lib/Driver/ToolChains/Linux.h > @@ -40,6 +40,7 @@ class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF { >void AddIAMCUIncludeArgs(const llvm::opt::ArgList , > llvm::opt::ArgStringList ) const override; >RuntimeLibType GetDefaultRuntimeLibType() const override; > + unsigned GetDefaultDwarfVersion() const override; >CXXStdlibType GetDefaultCXXStdlibType() const override; >bool >IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList ) const > override; > > diff --git a/clang/test/CodeGen/debug-info-extern-call.c > b/clang/test/CodeGen/debug-info-extern-call.c > index 7cf90550ac00a..fad52d0df0b3f 100644 > --- a/clang/test/CodeGen/debug-info-extern-call.c > +++ b/clang/test/CodeGen/debug-info-extern-call.c > @@ -12,13 +12,13 @@ > // decls so that the dwarf generator can describe information needed for tail > // call frame reconstrution. > // > -// RUN: %clang -g -O2 -target x86_64-none-linux-gnu -ggdb -S -emit-llvm %s > -o - \ > +// RUN: %clang -gdwarf-4 -O2 -target x86_64-none-linux-gnu -ggdb -S > -emit-llvm %s -o - \ > // RUN: | FileCheck %s -check-prefix=DECLS-FOR-EXTERN > // > // Do not emit a subprogram for extern decls when entry values are disabled > and > // the tuning is not set to gdb. > // > -// RUN: %clang -g -O2 -target x86_64-none-linux-gnu -gsce -S -emit-llvm %s > -o - \ > +// RUN: %clang -gdwarf-4 -O2 -target x86_64-none-linux-gnu -gsce -S > -emit-llvm %s -o - \ > // RUN: | FileCheck %s -check-prefix=NO-DECLS-FOR-EXTERN > > // DECLS-FOR-EXTERN-NOT: !DICompileUnit({{.*}}retainedTypes: !{{[0-9]+}} > > diff --git a/clang/test/CodeGen/dwarf-version.c > b/clang/test/CodeGen/dwarf-version.c > index 6d131c470d5b3..b329556ae0d9d 100644 > ---
[clang] d3b26de - Clang: Change the default DWARF version to 5
Author: David Blaikie Date: 2022-01-23T20:49:57-08:00 New Revision: d3b26dea16108c427b19b5480c9edc76edf8f5b4 URL: https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4 DIFF: https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8f5b4.diff LOG: Clang: Change the default DWARF version to 5 (except on platforms that already opt in to specific versions - SCE, Android, and Darwin using DWARFv4 explicitly, for instance) Added: Modified: clang/docs/ReleaseNotes.rst clang/include/clang/Driver/ToolChain.h clang/lib/Driver/ToolChains/Linux.h clang/test/CodeGen/debug-info-extern-call.c clang/test/CodeGen/dwarf-version.c clang/test/Driver/cl-options.c clang/test/Driver/clang-g-opts.c clang/test/Driver/ve-toolchain.c clang/test/Driver/ve-toolchain.cpp Removed: diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 2eec63901932e..4fe037741256f 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -252,6 +252,14 @@ X86 Support in Clang - Support for ``AVX512-FP16`` instructions has been added. +DWARF Support in Clang +-- + +- The default DWARF version has increased from DWARFv4 to DWARFv5. You can opt + back in to the old behavior with -gdwarf-4. Some platforms (Darwin, Android, + and SCE for instance) already opt out of this version bump as is suitable for + the platform + Arm and AArch64 Support in Clang diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h index eb95806a2f75d..37011de6bd6d7 100644 --- a/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h @@ -510,7 +510,7 @@ class ToolChain { // Return the DWARF version to emit, in the absence of arguments // to the contrary. - virtual unsigned GetDefaultDwarfVersion() const { return 4; } + virtual unsigned GetDefaultDwarfVersion() const { return 5; } // Some toolchains may have diff erent restrictions on the DWARF version and // may need to adjust it. E.g. NVPTX may need to enforce DWARF2 even when host diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h index a5ec33bd44f10..a5648d79d655f 100644 --- a/clang/lib/Driver/ToolChains/Linux.h +++ b/clang/lib/Driver/ToolChains/Linux.h @@ -40,6 +40,7 @@ class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF { void AddIAMCUIncludeArgs(const llvm::opt::ArgList , llvm::opt::ArgStringList ) const override; RuntimeLibType GetDefaultRuntimeLibType() const override; + unsigned GetDefaultDwarfVersion() const override; CXXStdlibType GetDefaultCXXStdlibType() const override; bool IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList ) const override; diff --git a/clang/test/CodeGen/debug-info-extern-call.c b/clang/test/CodeGen/debug-info-extern-call.c index 7cf90550ac00a..fad52d0df0b3f 100644 --- a/clang/test/CodeGen/debug-info-extern-call.c +++ b/clang/test/CodeGen/debug-info-extern-call.c @@ -12,13 +12,13 @@ // decls so that the dwarf generator can describe information needed for tail // call frame reconstrution. // -// RUN: %clang -g -O2 -target x86_64-none-linux-gnu -ggdb -S -emit-llvm %s -o - \ +// RUN: %clang -gdwarf-4 -O2 -target x86_64-none-linux-gnu -ggdb -S -emit-llvm %s -o - \ // RUN: | FileCheck %s -check-prefix=DECLS-FOR-EXTERN // // Do not emit a subprogram for extern decls when entry values are disabled and // the tuning is not set to gdb. // -// RUN: %clang -g -O2 -target x86_64-none-linux-gnu -gsce -S -emit-llvm %s -o - \ +// RUN: %clang -gdwarf-4 -O2 -target x86_64-none-linux-gnu -gsce -S -emit-llvm %s -o - \ // RUN: | FileCheck %s -check-prefix=NO-DECLS-FOR-EXTERN // DECLS-FOR-EXTERN-NOT: !DICompileUnit({{.*}}retainedTypes: !{{[0-9]+}} diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c index 6d131c470d5b3..b329556ae0d9d 100644 --- a/clang/test/CodeGen/dwarf-version.c +++ b/clang/test/CodeGen/dwarf-version.c @@ -2,8 +2,8 @@ // RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3 // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 // RUN: %clang -target x86_64-linux-gnu -gdwarf-5 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 -// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 -// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4 +// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 +// RUN: %clang -target x86_64-linux-gnu -gdwarf -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER5 // The -isysroot is