[PATCH] D46791: Make -gsplit-dwarf generally available

Jake Ehrlich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 14 10:48:43 PDT 2018


jakehehrlich added inline comments.


================
Comment at: lib/Driver/ToolChains/Clang.cpp:4818
   // Handle the debug info splitting at object creation time if we're
   // creating an object.
   if (SplitDWARF && Output.getType() == types::TY_Object)
----------------
Maybe re-add a TODO to point out that *some* objcopy is needed be it GNU objcopy or llvm-objcopy? Ideally this would be done by the compiler and not by an external tool.


================
Comment at: test/Driver/split-debug.c:7
 //
 // CHECK-ACTIONS: objcopy{{.*}}--extract-dwo{{.*}}"split-debug.dwo"
 // CHECK-ACTIONS: objcopy{{.*}}--strip-dwo{{.*}}"split-debug.o"
----------------
I think I may have missed something here. I thought this would change all of clang's objcopy invocations regardless of the target triple. What chooses "objcopy" if the target system is linux or linux-gnu? I think this might be passing because that line still matches "llvm-objcopy ..."


================
Comment at: test/Driver/split-debug.c:14
+//
+// FREEBSD-NOIA-CHECK-ACTIONS: llvm-objcopy{{.*}}--extract-dwo{{.*}}"split-debug.dwo"
+// FREEBSD-NOIA-CHECK-ACTIONS: llvm-objcopy{{.*}}--strip-dwo{{.*}}"split-debug.o"
----------------
When I wrote this I wanted this test to pass regardless of which objcopy was used so I just left it as "objcopy" because that would still pass if "llvm-objcopy" or "objcopy" was used. For instance my team builds the toolchain and we consider a build a fail of all tests don't pass. If someone wanted to use a GNU objcopy and built and tested toolchains the same way they would run into this issue.


Repository:
  rC Clang

https://reviews.llvm.org/D46791





More information about the cfe-commits mailing list