Commit b98e2bc4 authored by Stephen Martinis's avatar Stephen Martinis Committed by Commit Bot

Remove GYP_DEFINE reference in clang update.py

Bug: 756686, 873373
Change-Id: I22adc1b01841e97a81e230f4fa8b94e96fdf623a
Reviewed-on: https://chromium-review.googlesource.com/c/1309229
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604387}
parent b52abae3
......@@ -49,6 +49,11 @@ vars = {
# purposes.
'checkout_configuration': 'default',
# By default, don't check out android. Will be overridden by gclient
# variables.
# TODO(ehmaldonado): Remove this once the bug in gclient is fixed.
'checkout_android': False,
# Pull in Android native toolchain dependencies for Chrome OS too, so we can
# build ARC++ support libraries.
'checkout_android_native_support': 'checkout_android or checkout_chromeos',
......@@ -2056,7 +2061,7 @@ hooks = [
# Note: On Win, this should run after win_toolchain, as it may use it.
'name': 'clang',
'pattern': '.',
'action': ['python', 'src/tools/clang/scripts/update.py'],
'action': ['python', 'src/tools/clang/scripts/update.py', '--with-android={checkout_android}'],
},
{
# This is supposed to support the same set of platforms as 'clang' above.
......
......@@ -895,6 +895,15 @@ def UpdateClang(args):
return 0
def gn_arg(v):
if v == 'True':
return True
if v == 'False':
return False
raise argparse.ArgumentTypeError('Expected one of %r or %r' % (
'True', 'False'))
def main():
parser = argparse.ArgumentParser(description='Build Clang.')
parser.add_argument('--bootstrap', action='store_true',
......@@ -929,10 +938,12 @@ def main():
'and using prebuilt cmake binaries')
parser.add_argument('--verify-version',
help='verify that clang has the passed-in version')
parser.add_argument('--with-android', type=gn_arg, nargs='?', const=True,
help='build the Android ASan runtime (linux only)',
default=sys.platform.startswith('linux'))
parser.add_argument('--without-android', action='store_false',
help='don\'t build Android ASan runtime (linux only)',
dest='with_android',
default=sys.platform.startswith('linux'))
dest='with_android')
parser.add_argument('--without-fuchsia', action='store_false',
help='don\'t build Fuchsia clang_rt runtime (linux/mac)',
dest='with_fuchsia',
......@@ -986,9 +997,6 @@ def main():
PACKAGE_VERSION = CLANG_REVISION + '-0'
args.force_local_build = True
if 'OS=android' not in os.environ.get('GYP_DEFINES', ''):
# Only build the Android ASan rt on ToT bots when targetting Android.
args.with_android = False
# Don't build fuchsia runtime on ToT bots at all.
args.with_fuchsia = False
......
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