[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-19 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rGe50465ecefc9: [HIP] Fix -gsplit-dwarf option (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D87791?vs=292

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D87791#2279885 , @tra wrote: > In D87791#2279864 , @yaxunl wrote: > >> It is requested by our debugger team, so it should work with amdgpu. > > Is

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. (Note that ideally -gsplit-dwarf should not imply -g2 but it currents does so. And Clang and GCC have not agreed whether we should add a new flag like -fsplit-dwarf. /For -gsplit-dwarf builds, it is the best to ensure -g is also specified/.) CHANGES SINCE LAST ACTION

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:918 if (FinalOutput && Args.hasArg(options::OPT_c)) { -SmallString<128> T(FinalOutput->getValue()); +SmallString<128> T(llvm::sys::path::stem(FinalOutput->getValue())); +AddPostfi

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D87791#2279864 , @yaxunl wrote: > It is requested by our debugger team, so it should work with amdgpu. Is the naming scheme for GPU-side DWO files dictated by debugger? If that's the case, it may be worth adding a comment about th

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D87791#2279821 , @tra wrote: > In D87791#2278417 , @yaxunl wrote: > >> Therefore in either case there is no need to rename the intermediate .o >>

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D87791#2278417 , @yaxunl wrote: > Therefore in either case there is no need to rename the intermediate .o files > since they are temporary files which have unique names. > > The .dwo files are not temporary files. They are supposed

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D87791#2277887 , @tra wrote: > Does this naming scheme the same as used for `.o` files? We may want to keep > them in sync. > > Other than that, LGTM. .o file is different story. For -f

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-16 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Does this naming scheme the same as used for `.o` files? We may want to keep them in sync. Other than that, LGTM. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:909 + au