[Mac/iOS/GN] Remove setup_toolchain.py since gyp-mac-tool is not needed anymore.

BUG=616813
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2081933004
Cr-Original-Commit-Position: refs/heads/master@{#401300}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d6ab13319cf869060624f7ade7f4f952e7f95ea7
This commit is contained in:
rsesek 2016-06-22 09:28:10 -07:00 коммит произвёл Commit bot
Родитель 9b9e0de195
Коммит 212691ea33
2 изменённых файлов: 0 добавлений и 48 удалений

Просмотреть файл

@ -42,12 +42,6 @@ if (current_toolchain == default_toolchain) {
}
}
# This will copy the gyp-mac-tool to the build directory. We pass in the source
# file of the mac tool.
gyp_mac_tool_source =
rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir)
exec_script("setup_toolchain.py", [ gyp_mac_tool_source ])
# When implementing tools using Python scripts, a TOOL_VERSION=N env
# variable is placed in front of the command. The N should be incremented
# whenever the script is changed, so that the build system rebuilds all

Просмотреть файл

@ -1,42 +0,0 @@
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import stat
import sys
def CopyTool(source_path):
"""Copies the given tool to the current directory, including a warning not
to edit it."""
with open(source_path) as source_file:
tool_source = source_file.readlines()
# Add header and write it out to the current directory (which should be the
# root build dir). Don't write the file if a matching file already exists
# because that causes a cascade of unnecessary rebuilds.
match = False
contents = ''.join([tool_source[0],
'# Generated by setup_toolchain.py do not edit.\n']
+ tool_source[1:])
out_path = 'gyp-mac-tool'
try:
with open(out_path, 'rb') as read_tool_file:
existing_contents = read_tool_file.read()
if existing_contents == contents:
match = True
except:
pass
if not match:
with open(out_path, 'wb') as write_tool_file:
write_tool_file.write(contents)
st = os.stat(out_path)
if (st.st_mode & stat.S_IEXEC) == 0:
# Only chmod when necessary.
os.chmod(out_path, st.st_mode | stat.S_IEXEC)
# Find the tool source, it's the first argument, and copy it.
if len(sys.argv) != 2:
print "Need one argument (mac_tool source path)."
sys.exit(1)
CopyTool(sys.argv[1])