Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Unified Diff: build/toolchain/mac/linker_driver.py

Issue 2731313004: GN: Generate appropriate .dSYMs for .frameworks and .apps (Closed)
Patch Set: Modify linker_driver.py to create .dSYMs with correct names. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« build/toolchain/mac/BUILD.gn ('K') | « build/toolchain/mac/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/mac/linker_driver.py
diff --git a/build/toolchain/mac/linker_driver.py b/build/toolchain/mac/linker_driver.py
index 35de9d128783ed7d86c0b0b6f971c782e05023d7..fa523a3dbb704dc032af490e130126443e8ad28d 100755
--- a/build/toolchain/mac/linker_driver.py
+++ b/build/toolchain/mac/linker_driver.py
@@ -24,12 +24,13 @@ import sys
# removal of the special driver arguments, described below). Then the driver
# performs additional actions, based on these arguments:
#
-# -Wcrl,dsym,<dsym_path_prefix>
+# -Wcrl,dsym,<dsym_path_prefix>,<dsym_file_name>
# After invoking the linker, this will run `dsymutil` on the linker's
# output, producing a dSYM bundle, stored at dsym_path_prefix. As an
# example, if the linker driver were invoked with:
-# "... -o out/gn/obj/foo/libbar.dylib ... -Wcrl,dsym,out/gn ..."
-# The resulting dSYM would be out/gn/libbar.dylib.dSYM/.
+# "... -o out/gn/obj/foo/libbar.dylib ... -Wcrl,dsym,out/gn,
+# libbar.framework.dSYM ..."
+# The resulting dSYM would be out/gn/libbar.framework.dSYM/.
#
# -Wcrl,unstripped,<unstripped_path_prefix>
# After invoking the linker, and before strip, this will save a copy of
@@ -121,24 +122,29 @@ def ProcessLinkerDriverArg(arg):
raise ValueError('Unknown linker driver argument: %s' % (arg,))
-def RunDsymUtil(dsym_path_prefix, full_args):
- """Linker driver action for -Wcrl,dsym,<dsym-path-prefix>. Invokes dsymutil
- on the linker's output and produces a dsym file at |dsym_file| path.
+def RunDsymUtil(dsym_args_string, full_args):
+ """Linker driver action for -Wcrl,dsym,<dsym-path-prefix>,<dsym-file-name>.
+ Invokes dsymutil on the linker's output and produces a dsym file at
+ |dsym_path_prefix| path with |dsym_file_name| name.
Args:
- dsym_path_prefix: string, The path at which the dsymutil output should be
- located.
+ dsym_args_string: string, consists of comma-separated dsym_path_prefix and
+ dsym_file_name.
full_args: list of string, Full argument list for the linker driver.
+ dsym_path_prefix: string, The path at which the dsymutil output should be
+ located.
+ dsym_file_name: string, The resulting file name of the .dSYM bundle.
+
Returns:
list of string, Build step outputs.
"""
+ (dsym_path_prefix, dsym_file_name) = dsym_args_string.split(',')
if not len(dsym_path_prefix):
raise ValueError('Unspecified dSYM output file')
linker_out = _FindLinkerOutput(full_args)
- base = os.path.basename(linker_out)
- dsym_out = os.path.join(dsym_path_prefix, base + '.dSYM')
+ dsym_out = os.path.join(dsym_path_prefix, dsym_file_name)
# Remove old dSYMs before invoking dsymutil.
_RemovePath(dsym_out)
« build/toolchain/mac/BUILD.gn ('K') | « build/toolchain/mac/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698