Commit 61186549 authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Fix verify_order to use explicit paths for binaries.

Bug: 971452
Change-Id: If3c2939e0b4cc7c1f9b4b9b880e2a9288ba40fa6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649148Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667211}
parent 22b22d9c
......@@ -34,6 +34,7 @@ if (is_android) {
} else if (is_mac) {
import("//build/compiled_action.gni")
import("//build/config/mac/base_rules.gni")
import("//build/config/mac/mac_sdk.gni")
import("//build/config/mac/rules.gni")
import("//build/config/mac/symbols.gni")
import("//build/mac/tweak_info_plist.gni")
......@@ -1331,16 +1332,10 @@ if (is_win) {
"--stamp",
rebase_path(stamp_file, root_out_dir),
]
if (!use_system_xcode) {
args += [
"--developer_dir",
hermetic_xcode_path,
]
}
args += [
"_ChromeMain",
rebase_path(_framework_binary_path, root_out_dir),
mac_bin_path,
]
outputs = [
stamp_file,
......
......@@ -15,12 +15,8 @@ if __name__ == '__main__':
description='A wrapper around verify_order that writes a stamp file.')
parser.add_argument('--stamp', action='store', type=str,
help='Touch this stamp file on success.')
parser.add_argument('--developer_dir', required=False,
help='Path to Xcode.')
args, unknown_args = parser.parse_known_args()
if args.developer_dir:
os.environ['DEVELOPER_DIR'] = args.developer_dir
this_script_dir = os.path.dirname(sys.argv[0])
rv = subprocess.check_call(
......
......@@ -13,15 +13,18 @@
# This script can be used to verify that all of the global text symbols in
# a Mach-O file are accounted for in an order file.
if [ ${#} -ne 2 ] ; then
echo "usage: ${0} LAST_SYMBOL MACH_O_FILE" >& 2
if [ ${#} -ne 3 ] ; then
echo "usage: ${0} LAST_SYMBOL MACH_O_FILE BIN_SEARCH_PATH" >& 2
exit 1
fi
LAST_SYMBOL=${1}
MACH_O_FILE=${2}
BIN_SEARCH_PATH=${3}
NM_PATH="${BIN_SEARCH_PATH}nm"
OTOOL_PATH="${BIN_SEARCH_PATH}otool"
SYMBOLS=$(nm -gjn "${MACH_O_FILE}" -s __TEXT __text)
SYMBOLS=$("${NM_PATH}" -gjn "${MACH_O_FILE}" -s __TEXT __text)
if [ ${?} -ne 0 ] || [ -z "${SYMBOLS}" ] ; then
echo "${0}: no symbols in ${MACH_O_FILE}" >& 2
exit 1
......@@ -40,7 +43,7 @@ if [ ${?} -eq 0 ] || [ -n "${UNORDERED_SYMBOLS}" ] ; then
exit 1
fi
LIBS=$(otool -L "${MACH_O_FILE}")
LIBS=$("${OTOOL_PATH}" -L "${MACH_O_FILE}")
if [ ${?} -ne 0 ] ; then
echo "${0}: failed to get libraries in ${MACH_O_FILE}" >& 2
exit 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment