[PATCH] D154602: [clang][clangd] Don't crash/assert on -gsplit-dwarf=single without output

Dmitry Polukhin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 11:52:21 PDT 2023


DmitryPolukhin added inline comments.


================
Comment at: clang/unittests/Driver/ToolChainTest.cpp:371
+TEST(CompilerInvocation, SplitSwarfSingleCrash) {
+  static constexpr const char *Args[] = {"clang", "-gdwarf-4", "-gsplit-dwarf=single", "-c", "foo.cpp"};
+  CreateInvocationOptions CIOpts;
----------------
MaskRay wrote:
> Without a concrete target triple, the default is used. If the default target triple uses an object file format not supporting -gsplit-dwarf, this will fail.
Oh, could you please advise how to select right target triple for the test or limit it to the case when triple I specify here is supported? I had issue in the past with triples and it was tricky to select something that makes all llvm bots happy. I added `-target arm-linux-gnueabi` and test seems to be working if only x86 arch is enabled.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154602/new/

https://reviews.llvm.org/D154602



More information about the llvm-commits mailing list