blob: b17280a1b125779af2f178e7653242a469a5eafb [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2016 Google Inc.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import subprocess
import sys
def quiet(*cmd):
cmd = ' '.join(cmd).split()
def loud(*cmd):
cmd = ' '.join(cmd).split()
ret =
if ret != 0:
def gn_path():
if 'linux' in sys.platform:
return 'buildtools/linux64/gn'
if 'darwin' in sys.platform:
return 'buildtools/mac/gn'
return 'buildtools/win/gn.exe'
# Make sure we've got an up-to-date GN and Clang, and sysroot on Linux.
'--no_resume --no_auth --bucket chromium-gn',
'-s ', gn_path() + '.sha1')
quiet('python tools/clang/scripts/ --if-needed')
if 'linux' in sys.platform:
quiet('python build/linux/sysroot_scripts/ --arch=amd64')
# Pass all our arguments over to the real GN binary.
loud(gn_path(), *sys.argv[1:])