Revert "Explicitly specify path to strip and dsymutil for linker_driver.py."
This reverts commit 9cc11952e44ef12a6f4b16ff4e310f838bd0319f.
Reason for revert:
causes compile failure on Mac ASan 64 Builder
https://ci.chromium.org/p/chromium/builders/ci/Mac%20ASan%2064%20Builder/84739
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8911354223898031376/+/steps/compile/0/stdout
Original change's description:
> Explicitly specify path to strip and dsymutil for linker_driver.py.
>
> This allows the macOS toolchain to avoid using xcrun to find the path for strip
> and dsymutil.
>
> Bug: 971452
> Change-Id: Ib3d8865c44e1d95ed2fe22b6393d7e1549f9e621
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649054
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Erik Chen <erikchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#666915}
TBR=dpranke@chromium.org,erikchen@chromium.org
Change-Id: Id03189c55b584ec468ebed289206888abe5a0fa1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 971452
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647599
Reviewed-by: Takashi Sakamoto <tasak@google.com>
Commit-Queue: Takashi Sakamoto <tasak@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#666986}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2993e88f26894f8388d048417d454aa106de7500
diff --git a/mac/BUILD.gn b/mac/BUILD.gn
index 9cf25a9..3de0b92 100644
--- a/mac/BUILD.gn
+++ b/mac/BUILD.gn
@@ -148,13 +148,6 @@
"TOOL_VERSION=${tool_versions.linker_driver} " +
rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir)
- if (!use_system_xcode) {
- _dsymutilpath = "$hermetic_xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil"
- linker_driver += " -Wcrl,dsymutilpath," + _dsymutilpath
- _strippath = "$hermetic_xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip"
- linker_driver += " -Wcrl,strippath," + _strippath
- }
-
# On iOS, the final applications are assembled using lipo (to support fat
# builds). The correct flags are passed to the linker_driver.py script
# directly during the lipo call.
diff --git a/mac/linker_driver.py b/mac/linker_driver.py
index 4f4a13d..10bbda0 100755
--- a/mac/linker_driver.py
+++ b/mac/linker_driver.py
@@ -11,7 +11,6 @@
import sys
DSYMUTIL_INVOKE = ['xcrun', 'dsymutil']
-STRIP_INVOKE = ['xcrun', 'strip']
# The linker_driver.py is responsible for forwarding a linker invocation to
# the compiler driver, while processing special arguments itself.
@@ -46,10 +45,6 @@
# After invoking the linker, and optionally dsymutil, this will run
# the strip command on the linker's output. strip_arguments are
# comma-separated arguments to be passed to the strip command.
-#
-# -Wcrl,strippath,<strip_path>
-# Sets the path to the strip to run with -Wcrl,strip, in which case
-# `xcrun` is not used to invoke it.
def Main(args):
"""Main function for the linker driver. Separates out the arguments for
@@ -209,7 +204,7 @@
Returns:
list of string, Build step outputs.
"""
- strip_command = list(STRIP_INVOKE)
+ strip_command = ['xcrun', 'strip']
if len(strip_args_string) > 0:
strip_command += strip_args_string.split(',')
strip_command.append(_FindLinkerOutput(full_args))
@@ -217,25 +212,6 @@
return []
-def SetStripPath(strip_path, full_args):
- """Linker driver action for -Wcrl,strippath,<strip_path>.
-
- Sets the invocation command for strip, which allows the caller to specify
- an alternate strip. This action is always processed before the RunStrip
- action.
-
- Args:
- strip_path: string, The path to the strip binary to run
- full_args: list of string, Full argument list for the linker driver.
-
- Returns:
- No output - this step is run purely for its side-effect.
- """
- global STRIP_INVOKE
- STRIP_INVOKE = [strip_path]
- return []
-
-
def _FindLinkerOutput(full_args):
"""Finds the output of the linker by looking for the output flag in its
argument list. As this is a required linker argument, raises an error if it
@@ -272,7 +248,6 @@
('dsym,', RunDsymUtil),
('unstripped,', RunSaveUnstripped),
('strip,', RunStrip),
- ('strippath,', SetStripPath),
]