[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D149978#4323457 , @jhuber6 wrote: > In D149978#4323452 , @tra wrote: > >>> I've discovered that LLVM adds -Wl,-fcolor-diagnostics >> >> Can you tell me where it's done? > > `llvm/c

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Artem Belevich via Phabricator via cfe-commits
tra requested changes to this revision. tra added a comment. This revision now requires changes to proceed. In D149978#4323457 , @jhuber6 wrote: > `llvm/cmake/modules/HandleLLVMOptions.cmake:994` I do not think that we should work around this particular

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323452 , @tra wrote: >> I've discovered that LLVM adds -Wl,-fcolor-diagnostics > > Can you tell me where it's done? `llvm/cmake/modules/HandleLLVMOptions.cmake:994` Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > I've discovered that LLVM adds -Wl,-fcolor-diagnostics Can you tell me where it's done? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/ https://reviews.llvm.org/D149978

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323328 , @tra wrote: >> The latter is a little difficult, > > The more we dig, the more we want GPU-capable lld. :-) My thoughts exactly. I had a small chat with @MaskRay about how difficult it would be to spin up su

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > The latter is a little difficult, The more we dig, the more we want GPU-capable lld. :-) Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:641 + // by nvlink. + if (llvm::any_of(II.getInputArg().getValues(), [](StringRef Arg) { +retu

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 519977. jhuber6 added a comment. Putting up the hack that works around my problem with `libc`. Definitely not a good solution though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/ https://reviews.l

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323221 , @tra wrote: > In D149978#4323210 , @jhuber6 wrote: > >> Somewhat annoying, I've discovered that LLVM adds `-Wl,-fcolor-diagnostics` >> which obviously isn't supported

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D149978#4323210 , @jhuber6 wrote: > Somewhat annoying, I've discovered that LLVM adds `-Wl,-fcolor-diagnostics` > which obviously isn't supported by `nvlink` so it fails while including this > in `libc`'s CMake. Any clue if there

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. The main reason I made this patch was to allow passing `--suppress-stack-size-warning` to `nvlink`. But it turns out it's a little more difficult there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/ https://re

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Somewhat annoying, I've discovered that LLVM adds `-Wl,-fcolor-diagnostics` which obviously isn't supported by `nvlink` so it fails while including this in `libc`'s CMake. Any clue if there's a way to work around that? Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 519957. jhuber6 added a comment. Addressing comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/ https://reviews.llvm.org/D149978 Files: clang/lib/Driver/ToolChains/Cuda.cpp clang/test/Driver

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:594 - // Add paths specified in LIBRARY_PATH environment variable as -L options. - addDirectoryList(Args, CmdArgs, "-L", "LIBRARY_PATH"); -

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:594 - // Add paths specified in LIBRARY_PATH environment variable as -L options. - addDirectoryList(Args, CmdArgs, "-L", "LIBRARY_PATH"); - Is removal of this line intentional? =

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, tra, yaxunl, MaskRay. Herald added subscribers: mattd, gchakrabarti, asavonic. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We