[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-25 Thread Azat Khuzhin via Phabricator via cfe-commits
azat abandoned this revision. azat added a comment. Closing in favor of https://reviews.llvm.org/D133092 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133875/new/ https://reviews.llvm.org/D133875 ___ cfe

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-15 Thread Azat Khuzhin via Phabricator via cfe-commits
azat marked 2 inline comments as done. azat added inline comments. Comment at: clang/test/Driver/debug-options-aranges.c:7 +// RUN: %clang -### -g -target x86_64-linux -flto=thin -fuse-ld=lld -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=PLUGIN_GARANGE %s +// GARANGE: -gener

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-15 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 460475. azat added a comment. Update the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133875/new/ https://reviews.llvm.org/D133875 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/test/Driver/deb

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/test/Driver/debug-options-aranges.c:15 +// RUN: %clang -g -target x86_64-linux -flto=thin -fuse-ld=lld -gdwarf-aranges %s -o - | llvm-dwarfdump --debug-aranges - | FileCheck -check-prefix=ARANGES %s +// ARANGES: Address Range Hea

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-15 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: clang/test/Driver/debug-options-aranges.c:7 +// RUN: %clang -### -g -target x86_64-linux -flto=thin -fuse-ld=lld -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=PLUGIN_GARANGE %s +// GARANGE: -generate-arange-section +// PLUGIN_GARA

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-15 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 460321. azat added a comment. Fix clang-format and tiny test refactoring Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133875/new/ https://reviews.llvm.org/D133875 Files: clang/lib/Driver/ToolChains/CommonArgs.

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat marked an inline comment as done. azat added a comment. > The message is outdated now. Actually even before it does not check that `.debug_aranges` had been emitted. > This just checks how -gdwarf-aranges ias passed to the compiler and linker. I've improved the test (though maybe `Address

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 460304. azat added a comment. Test cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133875/new/ https://reviews.llvm.org/D133875 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/test/Driver/debug-

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 460302. azat added a comment. Add a real check of .debug_aranges in the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133875/new/ https://reviews.llvm.org/D133875 Files: clang/lib/Driver/ToolChains/CommonA

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/debug-options-aranges.c:1 +// Check that lld will emit dwarf aranges. + The message is outdated now. This just checks how -gdwarf-aranges ias passed to the compiler and linker. Comme

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 460212. azat added a comment. Use --plugin-opt=-generate-arange-section instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133875/new/ https://reviews.llvm.org/D133875 Files: clang/lib/Driver/ToolChains/Com

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > I think @MaskRay was saying this doesn't actually work & different flags are > needed to pass to lld I thought that @MaskRay was talking about more generic approach that will not require if for the linker name, and indeed `--plugin-opt=-generate-arange-section` is bette

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-14 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I think @maskray was saying this doesn't actually work & different flags are needed to pass to lld - have you tested this end-to-end/with a real compilation, does that work? (are there other cases that already use `-mllvm` to pass flags down to lld?) Repository: rG

[PATCH] D133875: [clang] fix generation of .debug_aranges with LTO (resubmit)

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat created this revision. Herald added a subscriber: inglorion. Herald added a project: All. azat requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Right now in case of LTO the section is not emited: $ cat test.c void __attribu