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

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

Issue 2160653002: [iOS/GN] Fix generation of .dSYM for fat binary builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and add support for save_unstripped_output. Created 4 years, 5 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
« no previous file with comments | « build/toolchain/mac/BUILD.gn ('k') | components/cronet/ios/BUILD.gn » ('j') | 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 9aa4b414ef150f4d6137e013e347bd2b7e132766..40676f6427dfb882840d2b9418ba21143633b5d5 100755
--- a/build/toolchain/mac/linker_driver.py
+++ b/build/toolchain/mac/linker_driver.py
@@ -185,7 +185,15 @@ def _FindLinkerOutput(full_args):
argument list. As this is a required linker argument, raises an error if it
cannot be found.
"""
- return full_args[full_args.index('-o') + 1]
+ # The linker_driver.py script may be used to wrap either the compiler linker
+ # (uses -o to configure the output) or lipo (uses -output to configure the
+ # output). Since wrapping the compiler linker is the most likely possibility
+ # use try/except and fallback to checking for -output if -o is not found.
+ try:
+ output_flag_index = full_args.index('-o')
+ except ValueError:
+ output_flag_index = full_args.index('-output')
+ return full_args[output_flag_index + 1]
def _RemovePath(path):
« no previous file with comments | « build/toolchain/mac/BUILD.gn ('k') | components/cronet/ios/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698