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 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: CHECK-NEXT: CHECK-NEXT: @@ -26,5 +29,7 @@ CHECK-NEXT: 2.0 CHECK-NEXT: CFBundleVersion CHECK-NEXT: 2 -CHECK-NEXT: +TOOLCHAIN: Toolchain +TOOLCHAIN-NEXT: toolchain +CHECK: CHECK-NEXT: 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= HELP: -oso-prepend-path= HELP: -symtab +HELP: -toolchain HELP: -update HELP: -verbose HELP: -verify 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 Verify("verify", desc("Verify the linked DWARF debug info."), cat(DsymCategory)); +static opt + 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" << BI.ShortVersionStr << "\n"; PL << "\t\tCFBundleVersion\n" - << "\t\t" << BI.VersionStr << "\n" - << "\t\n" + << "\t\t" << BI.VersionStr << "\n"; + + if (!Toolchain.empty()) + PL << "\t\tToolchain\n" + << "\t\t" << Toolchain << "\n"; + + PL << "\t\n" << "\n"; PL.close();