[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.
Yunlian Jiang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 25 15:47:37 PDT 2018
yunlian updated this revision to Diff 152794.
https://reviews.llvm.org/D44788
Files:
lib/Driver/ToolChains/CommonArgs.cpp
test/Driver/lto-dwo.c
Index: test/Driver/lto-dwo.c
===================================================================
--- /dev/null
+++ test/Driver/lto-dwo.c
@@ -0,0 +1,6 @@
+// Confirm that -gsplit-dwarf=DIR is passed to linker
+
+// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -gsplit-dwarf -o a.out 2> %t
+// RUN: FileCheck -check-prefix=CHECK-LINK-DWO-DIR-DEFAULT < %t %s
+//
+// CHECK-LINK-DWO-DIR-DEFAULT: "-plugin-opt=dwo_dir=a.out_dwo"
Index: lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- lib/Driver/ToolChains/CommonArgs.cpp
+++ lib/Driver/ToolChains/CommonArgs.cpp
@@ -416,6 +416,12 @@
CmdArgs.push_back(Args.MakeArgString(Twine("-plugin-opt=O") + OOpt));
}
+ if (Args.hasArg(options::OPT_gsplit_dwarf)) {
+ CmdArgs.push_back(
+ Args.MakeArgString(Twine("-plugin-opt=dwo_dir=") +
+ Output.getFilename() + "_dwo"));
+ }
+
if (IsThinLTO)
CmdArgs.push_back("-plugin-opt=thinlto");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44788.152794.patch
Type: text/x-patch
Size: 991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180625/77e77a3a/attachment.bin>
More information about the cfe-commits
mailing list