[PATCH] D42688: [dsymutil] Upstream -minimize feature.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 11:57:53 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL323812: [dsymutil] Enable -minimize feature. (authored by JDevlieghere, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D42688?vs=131960&id=132022#toc
Repository:
rL LLVM
https://reviews.llvm.org/D42688
Files:
llvm/trunk/docs/CommandGuide/dsymutil.rst
llvm/trunk/test/tools/dsymutil/X86/minimize.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
@@ -6,6 +6,7 @@
HELP: -arch=<arch>
HELP: -dump-debug-map
HELP: -flat
+HELP: -minimize
HELP: -no-odr
HELP: -no-output
HELP: -no-swiftmodule-timestamp
Index: llvm/trunk/test/tools/dsymutil/X86/minimize.test
===================================================================
--- llvm/trunk/test/tools/dsymutil/X86/minimize.test
+++ llvm/trunk/test/tools/dsymutil/X86/minimize.test
@@ -0,0 +1,9 @@
+RUN: llvm-dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s --check-prefix=FULL
+RUN: llvm-dsymutil --minimize -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s
+RUN: llvm-dsymutil -z -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic.macho.x86_64 | llvm-readobj -sections - | FileCheck %s
+
+FULL: Name: __debug_pubnames
+FULL: Name: __debug_pubtypes
+
+CHECK-NOT: Name: __debug_pubnames
+CHECK-NOT: Name: __debug_pubtypes
Index: llvm/trunk/tools/dsymutil/dsymutil.cpp
===================================================================
--- llvm/trunk/tools/dsymutil/dsymutil.cpp
+++ llvm/trunk/tools/dsymutil/dsymutil.cpp
@@ -75,6 +75,15 @@
init(false), cat(DsymCategory));
static alias FlatOutA("f", desc("Alias for --flat"), aliasopt(FlatOut));
+static opt<bool> Minimize(
+ "minimize",
+ desc("When used when creating a dSYM file, this option will suppress\n"
+ "the emission of the .debug_inlines, .debug_pubnames, and\n"
+ ".debug_pubtypes sections since dsymutil currently has better\n"
+ "equivalents: .apple_names and .apple_types."),
+ init(false), cat(DsymCategory));
+static alias MinimizeA("z", desc("Alias for --minimize"), aliasopt(Minimize));
+
static opt<unsigned> NumThreads(
"num-threads",
desc("Specifies the maximum number (n) of simultaneous threads to use\n"
@@ -302,6 +311,7 @@
Options.Verbose = Verbose;
Options.NoOutput = NoOutput;
Options.NoODR = NoODR;
+ Options.Minimize = Minimize;
Options.NoTimestamp = NoTimestamp;
Options.PrependPath = OsoPrependPath;
Index: llvm/trunk/docs/CommandGuide/dsymutil.rst
===================================================================
--- llvm/trunk/docs/CommandGuide/dsymutil.rst
+++ llvm/trunk/docs/CommandGuide/dsymutil.rst
@@ -35,6 +35,13 @@
Produce a flat dSYM file. A ``.dwarf`` extension will be appended to the
executable name unless the output file is specified using the -o option.
+
+.. option:: -z, --minimize
+
+ When used when creating a dSYM file, this option will suppress the emission of
+ the .debug_inlines, .debug_pubnames, and .debug_pubtypes sections since
+ dsymutil currently has better equivalents: .apple_names and .apple_types.
+
.. option:: --no-odr
Do not use ODR (One Definition Rule) for uniquing C++ types.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42688.132022.patch
Type: text/x-patch
Size: 3047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180130/121e5ff8/attachment.bin>
More information about the llvm-commits
mailing list