summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-03-08 10:39:12 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-03-08 10:39:12 +0000
commit2902a21ef327df697f23355271041bbc43f59ee7 (patch)
tree759227d53d992f326b90466c30e497464ec87225 /llvm/tools
parent30e94029d8d4aeb3584319b6cd696016c206b217 (diff)
downloadbcm5719-llvm-2902a21ef327df697f23355271041bbc43f59ee7.tar.gz
bcm5719-llvm-2902a21ef327df697f23355271041bbc43f59ee7.zip
[dsymutil] Embed toolchain in dSYM bundle
Allow us to embed the (Xcode) toolchain in the dSYM bundle's property list. Differential revision: https://reviews.llvm.org/D44151 llvm-svn: 326994
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/dsymutil/dsymutil.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/tools/dsymutil/dsymutil.cpp b/llvm/tools/dsymutil/dsymutil.cpp
index adc2e859438..bbde2094f02 100644
--- a/llvm/tools/dsymutil/dsymutil.cpp
+++ b/llvm/tools/dsymutil/dsymutil.cpp
@@ -142,6 +142,10 @@ static opt<bool> InputIsYAMLDebugMap(
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 @@ static bool createPlistFile(llvm::StringRef Bin, llvm::StringRef BundleRoot) {
<< "\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();
OpenPOWER on IntegriCloud