Move detect_v8_host_arch out of gypfiles.
R=machenbach@chromium.org Bug: v8:7335 Change-Id: I49317fed6c91064109d3adff06b0bba474e11f1d Reviewed-on: https://chromium-review.googlesource.com/892865 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#50975}
This commit is contained in:
parent
9c4c717b5d
commit
8ffa1f10cb
@ -48,7 +48,8 @@ import gyp
|
||||
# Add paths so that pymod_do_main(...) can import files.
|
||||
sys.path.insert(
|
||||
1, os.path.abspath(os.path.join(v8_root, 'tools', 'generate_shim_headers')))
|
||||
|
||||
sys.path.append(
|
||||
os.path.abspath(os.path.join(v8_root, 'third_party', 'binutils')))
|
||||
|
||||
def GetOutputDirectory():
|
||||
"""Returns the output directory that GYP will use."""
|
||||
|
@ -38,6 +38,9 @@ def main():
|
||||
return 0
|
||||
|
||||
def DoMain(_):
|
||||
return DetectHostArch();
|
||||
|
||||
def DetectHostArch():
|
||||
"""Hook to be called from gyp without starting a separate python
|
||||
interpreter."""
|
||||
host_arch = platform.machine()
|
6
third_party/binutils/download.py
vendored
6
third_party/binutils/download.py
vendored
@ -15,6 +15,7 @@ import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from detect_v8_host_arch import DetectHostArch
|
||||
|
||||
|
||||
BINUTILS_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
@ -22,9 +23,6 @@ BINUTILS_FILE = 'binutils.tar.bz2'
|
||||
BINUTILS_TOOLS = ['bin/ld.gold', 'bin/objcopy', 'bin/objdump']
|
||||
BINUTILS_OUT = 'Release'
|
||||
|
||||
DETECT_HOST_ARCH = os.path.abspath(os.path.join(
|
||||
BINUTILS_DIR, '../../gypfiles/detect_v8_host_arch.py'))
|
||||
|
||||
|
||||
def ReadFile(filename):
|
||||
with file(filename, 'r') as f:
|
||||
@ -48,7 +46,7 @@ def GetArch():
|
||||
return 'x64'
|
||||
return arch
|
||||
|
||||
return subprocess.check_output(['python', DETECT_HOST_ARCH]).strip()
|
||||
return DetectHostArch()
|
||||
|
||||
|
||||
def FetchAndExtract(arch):
|
||||
|
Loading…
Reference in New Issue
Block a user