[PATCH] D44151: [dsymutil] Embed toolchain in dSYM bundle
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 8 02:43:28 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL326994: [dsymutil] Embed toolchain in dSYM bundle (authored by JDevlieghere, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D44151?vs=137190&id=137551#toc
Repository:
rL LLVM
https://reviews.llvm.org/D44151
Files:
llvm/trunk/docs/CommandGuide/dsymutil.rst
llvm/trunk/test/tools/dsymutil/X86/darwin-bundle.test
llvm/trunk/test/tools/dsymutil/cmdline.test
llvm/trunk/tools/dsymutil/dsymutil.cpp
Index: llvm/trunk/test/tools/dsymutil/cmdline.test
===================================================================
--- llvm/trunk/test/tools/dsymutil/cmdline.test
+++ llvm/trunk/test/tools/dsymutil/cmdline.test
@@ -14,6 +14,7 @@
HELP: -o=<filename>
HELP: -oso-prepend-path=<path>
HELP: -symtab
+HELP: -toolchain
HELP: -update
HELP: -verbose
HELP: -verify
Index: llvm/trunk/test/tools/dsymutil/X86/darwin-bundle.test
===================================================================
--- llvm/trunk/test/tools/dsymutil/X86/darwin-bundle.test
+++ llvm/trunk/test/tools/dsymutil/X86/darwin-bundle.test
@@ -8,6 +8,9 @@
RUN: llvm-dsymutil -oso-prepend-path=%p/.. %t/basic.macho.x86_64 -o %t/dsymdest/basic.macho.x86_64.dSYM
RUN: FileCheck %s --input-file %t/dsymdest/basic.macho.x86_64.dSYM/Contents/Info.plist
+RUN: llvm-dsymutil -oso-prepend-path=%p/.. %t/basic.macho.x86_64 -toolchain "toolchain" -o %t/dsymdest/basic.macho.x86_64.dSYM
+RUN: FileCheck %s --input-file %t/dsymdest/basic.macho.x86_64.dSYM/Contents/Info.plist --check-prefix=CHECK --check-prefix=TOOLCHAIN
+
CHECK: <?xml version="1.0" encoding="UTF-8"?>
CHECK-NEXT: <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
CHECK-NEXT: <plist version="1.0">
@@ -26,5 +29,7 @@
CHECK-NEXT: <string>2.0</string>
CHECK-NEXT: <key>CFBundleVersion</key>
CHECK-NEXT: <string>2</string>
-CHECK-NEXT: </dict>
+TOOLCHAIN: <key>Toolchain</key>
+TOOLCHAIN-NEXT: <string>toolchain</string>
+CHECK: </dict>
CHECK-NEXT: </plist>
Index: llvm/trunk/tools/dsymutil/dsymutil.cpp
===================================================================
--- llvm/trunk/tools/dsymutil/dsymutil.cpp
+++ llvm/trunk/tools/dsymutil/dsymutil.cpp
@@ -142,6 +142,10 @@
static opt<bool> Verify("verify", desc("Verify the linked DWARF debug info."),
cat(DsymCategory));
+static opt<std::string>
+ Toolchain("toolchain", desc("Embed toolchain information in dSYM bundle."),
+ cat(DsymCategory));
+
static bool createPlistFile(llvm::StringRef Bin, llvm::StringRef BundleRoot) {
if (NoOutput)
return true;
@@ -189,8 +193,13 @@
<< "\t\t<string>" << BI.ShortVersionStr << "</string>\n";
PL << "\t\t<key>CFBundleVersion</key>\n"
- << "\t\t<string>" << BI.VersionStr << "</string>\n"
- << "\t</dict>\n"
+ << "\t\t<string>" << BI.VersionStr << "</string>\n";
+
+ if (!Toolchain.empty())
+ PL << "\t\t<key>Toolchain</key>\n"
+ << "\t\t<string>" << Toolchain << "</string>\n";
+
+ PL << "\t</dict>\n"
<< "</plist>\n";
PL.close();
Index: llvm/trunk/docs/CommandGuide/dsymutil.rst
===================================================================
--- llvm/trunk/docs/CommandGuide/dsymutil.rst
+++ llvm/trunk/docs/CommandGuide/dsymutil.rst
@@ -74,6 +74,10 @@
Dumps the symbol table found in *executable* or object file(s) and exits.
+.. option:: --toolchain
+
+ Embed the toolchain in the dSYM bundle's property list.
+
.. option:: -u, --update
Update an existing dSYM file to contain the latest accelerator tables and
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44151.137551.patch
Type: text/x-patch
Size: 3219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180308/dd89ae0d/attachment.bin>
More information about the llvm-commits
mailing list