[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-10-04 Thread David Blaikie via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG165128989568: [clang] fix generation of .debug_aranges with LTO (authored by azat, committed by dblaikie). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1330

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-10-02 Thread Azat Khuzhin via Phabricator via cfe-commits
azat marked an inline comment as done. azat added a comment. > Optional: End full sentences with a period. Some directories use the > convention that non-RUN-non-CHECK lines use /// as the comment marker. The > idea is to make comments stand out and foster possible future lit/FileCheck > improv

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-10-02 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 464542. azat marked an inline comment as done. azat added a comment. Update comment in the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: clang/lib/Driver

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/debug-options-aranges.c:1 +// REQUIRES: lld + Remove `// REQUIRES: lld` Comment at: clang/test/Driver/

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-10-01 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 464486. azat added a comment. Rerun CI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/test/Driver/debug-opti

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-29 Thread Azat Khuzhin via Phabricator via cfe-commits
azat marked an inline comment as done. azat added a comment. Apparently test failures are not related? Failed Tests (1): Clangd Unit Tests :: ./ClangdTests/TUSchedulerTests/IncluderCache Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/ne

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-29 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:5 +// +// RUN: %clang -### -g -target x86_64-linux -flto -fuse-ld=lld -gdwarf-aranges %s 2>&1 | FileCheck %s +// RUN: %clang -### -g -target x86_64-linux

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

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

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/debug-options-aranges.c:5 +// +// RUN: %clang -### -g -target x86_64-linux -flto -fuse-ld=lld -gdwarf-aranges %s 2>&1 | FileCheck %s +// RUN: %clang -### -g -target x86_64-linux -flto=thin -fuse-ld=lld -gdwarf-ar

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-29 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added inline comments. Comment at: clang/test/Driver/debug-options-aranges.c:5 +// +// RUN: %clang -### -g -target x86_64-linux -flto -fuse-ld=lld -gdwarf-aranges %s 2>&1 | FileCheck %s +// RUN: %clang -### -g -target x86_64-linux -flto=thin -fuse-ld=lld -gdwarf-arang

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/debug-options-aranges.c:5 +// +// RUN: %clang -### -g -target x86_64-linux -flto -fuse-ld=lld -gdwarf-aranges %s 2>&1 | FileCheck %s +// RUN: %clang -### -g -target x86_64-linux -flto=thin -fuse-ld=lld -gdwarf-ar

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-28 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. Can someone make a final review please? Thanks in advance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 ___ cfe-commits mailing list cf

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-25 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > If the two patches are basically identical with just some fixes for the > problem, the convention is to reuse the original Differential. I've updated this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-25 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 462756. azat added a comment. Resubmit with fixed tests and using --plugin-opt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: clang/lib/Driver/ToolChains/Commo

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-20 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > If the two patches are basically identical with just some fixes for the > problem, the convention is to reuse the original Differential. Ok, did not know that, will keep it in mind, thanks! > You can click "Add Action - Open" (or Reopen?), then you can upload a new > pa

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. If the two patches are basically identical with just some fixes for the problem, the convention is to reuse the original Differential. You can click "Add Action - Open" (or Reopen?), then you can upload a new patch to update the Differential. This keeps all discussions i

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-20 Thread Azat Khuzhin via Phabricator via cfe-commits
azat abandoned this revision. azat added a comment. > Which patch needs review, this one or D133875 > ? Or are they both relevant? Sorry, wrote in the wrong thread. The only patch that needs review is resubmitted version - https://reviews.llvm.org/D133875 > (t

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-20 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Which patch needs review, this one or D133875 ? Or are they both relevant? (their names are basically identical, so I'm not sure which is needed/how they're different) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-20 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. Can someone do a final review on this? And apply it if everything is OK. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 ___ cfe-commits m

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > I wasn't expecting that Oh, I see, it wasn't the linker, but the plugin. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 ___ cfe-commit

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > This is not correct. GNU ld and gold don't accept -mllvm. You need to use > -plugin-opt=-generate... @MaskRay actually those options will be added only if the name matches `lld`/`lld.exe` (but I guess I need to provide more context so that it will be easier to understan

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This is not correct. GNU ld and gold don't accept `-mllvm`. You need to use `-plugin-opt=-generate...` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 ___

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-14 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Reverted this in 5631d20bfc9f77d15435badf6ce34e1a56c27e1c since the fix for the test failures this change here caused got reverted due to breaking other tests. Let's regroup and make a new patch that

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-14 Thread Kazushi Marukawa via Phabricator via cfe-commits
kaz7 added a comment. In D133092#3788749 , @azat wrote: > In D133092#3788734 , @kaz7 wrote: > >> For your information, after this patch `check-clang` fails with following >> errors if there is no lld (lld is not

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. In D133092#3788734 , @kaz7 wrote: > For your information, after this patch `check-clang` fails with following > errors if there is no lld (lld is not enable in CMake, and lld is not > installed previously). I appreciate if you run

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-14 Thread Kazushi Marukawa via Phabricator via cfe-commits
kaz7 added a comment. For your information, after this patch `check-clang` fails with following errors if there is no lld is installed (lld is not enable in CMake, and lld is not installed previously). I appreciate if you run debug-options.c test with `-fuse-ld=lld` if the lld is existing. Th

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-13 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > ~sort of. The process is described here: > https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Yep, already looked through it, thanks for the link. > But generally not every developer is immediately aware of who has/doesn't > have commit access - so if yo

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-13 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. Hm, by some reason on CI there is `lld`, any clue? (I've looked through other tests, and cannot find anything different that will show path to lld or require it explicitly) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D133092#3787379 , @azat wrote: >> the usual flow would be once you have approval to go ahead and submit the >> patch yourself - I take it you don't have commit access? > > Yeah, I don't > I though that only trusted/experience

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-13 Thread David Blaikie via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6bf6730ac55e: [clang] fix generation of .debug_aranges with LTO (authored by azat, committed by dblaikie). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1330

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-13 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. > we don't use addLTOOptions() for either PS4 or PS5, so this patch doesn't > affect (or help) them. I'm okay with saying we'll need to deal with that case > separately. FTR, I've raised an internal ticket about this, and someone from Sony will handle it. Repositor

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-13 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > the usual flow would be once you have approval to go ahead and submit the > patch yourself - I take it you don't have commit access? Yeah, I don't I though that only trusted/experienced/... llvm devs can commit. > In which case I can commit this on your behalf. Yes, ple

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D133092#3787247 , @azat wrote: > Is there anything left here? Generally not. the usual flow would be once you have approval to go ahead and submit the patch yourself - I take it you don't have commit access? In which case I

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-13 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. Is there anything left here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-08 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Sounds good Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-08 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 458723. azat marked an inline comment as done. azat added a comment. Update comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: clang/lib/Driver/ToolChains/

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-08 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:515 +// +// But note, this solution is far from perfert, better to encode it into IR +// metadata, but this may not worth it, since looks like aranges on the way T

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

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

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-08 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I'm happy if @dblaikie is happy. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:515 +// +// And as @dblaikie noted, this solution is far from perfert, better to +// encode it into IR metadata, but this may not worth it, since looks

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-08 Thread Azat Khuzhin via Phabricator via cfe-commits
azat marked an inline comment as done. azat added a comment. @dblaikie Rebased. Brief of you comment had been added into the code, and the whole comment included into the commit message. Thanks for taking a look! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-08 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 458663. azat added a comment. Adjust comments as suggested by @dblaikie Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: clang/lib/Driver/ToolChains/CommonArgs.c

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-07 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:512-513 +// handle SCE (like in Clang.cpp::renderDebugOptions()) +bool NeedAranges = Args.hasArg(options::OPT_gdwarf_aranges); +if (NeedAranges) { + CmdArgs.push_back(Args.MakeArgS

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-07 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. (generally seems OK - maybe include a comment about this being a less-than-perfect solution (the better solution would be to encode this in IR metadata (DICompileUnit) if it's reasonable to respect this option on a per-CU basis (which it probably is, though that'd be a

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-07 Thread Azat Khuzhin via Phabricator via cfe-commits
azat marked 2 inline comments as done. azat added a comment. > PS4CPU.cpp actually does have a case where we pass "-mllvm > -enable-jmc-instrument" to lld, so you are not breaking new ground here. Great, thanks for pointing out! The patch had been rebased with addressed comments. Repository:

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-07 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 458573. azat added a comment. Update test and comments in the code (suggestions from @probinson) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: clang/lib/Drive

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-07 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a reviewer: probinson. probinson added a comment. > Yeah, but it seems that it is not possible to use lld for PS4 It's correct that PS4 does not use lld. PS5 does use lld (under a different name). But, we don't use addLTOOptions() for either PS4 or PS5, so this patch doesn't af

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-06 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. Can someone take a look please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-04 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 457850. azat added a comment. Adjust the test (to fix build on windows) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: clang/lib/Driver/ToolChains/CommonArgs.c

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-02 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 457678. azat added a comment. v3: test only linux (to avoid failures on windows) v4: add a comment about SCE Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: cla

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-02 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. @Orlando thanks for taking a look! > When constructing the compiler command line (here in Clang.cpp) there's a > special case for SCE debugger tuning: Yeah, but it seems that it is not possible to use `lld` for PS4 (only `orbis-ld`), according to https://github.com/llvm/

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-09-01 Thread Orlando Cazalet-Hyams via Phabricator via cfe-commits
Orlando added subscribers: probinson, Orlando. Orlando added a comment. When constructing the compiler command line (here in Clang.cpp ) there's a special case for SCE

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-08-31 Thread Azat Khuzhin via Phabricator via cfe-commits
azat updated this revision to Diff 457182. azat added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133092/new/ https://reviews.llvm.org/D133092 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/test/Driver/debug-opti

[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO

2022-08-31 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