[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 >

[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:

[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

[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

[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

[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

[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

[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

[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:

[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 ___

[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 >

[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 >

[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

[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:

[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

[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:

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

2022-09-15 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-15 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

[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 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:

[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:

[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 ___

[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

[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

[PATCH] D133847: [test][clang] fix pattern for LDGARANGE-NOT in debug-options-lld test

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

[PATCH] D133847: [test][clang] fix pattern for LDGARANGE-NOT in debug-options-lld test

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > Perhaps lld[^"]*" would be better? But yeah, this looks better anyway. Applied your suggestion. New revision - https://reviews.llvm.org/D133875 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133847/new/

[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

[PATCH] D133847: [test][clang] fix pattern for LDGARANGE-NOT in debug-options-lld test

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > Presumably this would break if someone's build uses a tool suffix (so lld > becomes lld-tot or something like that)? Perhaps lld[^"]*" would be better? I thought about this too, but I found this in another test, so likely it should work... > Are there other test cases

[PATCH] D133841: [test][clang] run test for lld emitting dwarf-aranages only if lld is presented

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. @thakis Thanks for taking a look! Actually initially the problem had been introduced in https://reviews.llvm.org/D133092 I've run tests locally, however I did have lld in a system, so I did not noticed the problem. And CI did not find the problem either, since I guess it

[PATCH] D133841: [test][clang] run test for lld emitting dwarf-aranages only if lld is presented

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > the test crashes with sanitizers > https://lab.llvm.org/buildbot/#/builders/5/builds/27437 yep, this should be fixed in https://reviews.llvm.org/D133847 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133841/new/

[PATCH] D133847: [test][clang] fix pattern for LDGARANGE-NOT in debug-options-lld test

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

[PATCH] D133841: [test][clang] run test for lld emitting dwarf-aranages only if lld is presented

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat added a comment. > Can you please fix this? It should be fixed in https://reviews.llvm.org/D133847 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133841/new/ https://reviews.llvm.org/D133841 ___

[PATCH] D133847: [test][clang] fix pattern for LDGARANGE-NOT in debug-options-lld test

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat created this revision. azat added reviewers: hokein, dblaikie. Herald added a project: All. azat requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Now, when the filename contains lld, it does not filter correctly. Repository: rG

[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

[PATCH] D133841: [test][clang] run test for lld emitting dwarf-aranages only if lld is presented Fixes: https://reviews.llvm.org/D133092 CI: https://lab.llvm.org/buildbot/#/builders/109/builds/46592

2022-09-14 Thread Azat Khuzhin via Phabricator via cfe-commits
azat created this revision. azat added a reviewer: dblaikie. Herald added a project: All. azat requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D133841 Files:

[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. > ~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

[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. 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

[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,

[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

[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:

[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

[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

[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:

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

2022-09-08 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) { +

[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:

[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

[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:

[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:

[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

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

2022-09-01 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

[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