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 = { ...@@ -49,6 +49,11 @@ vars = {
# purposes. # purposes.
'checkout_configuration': 'default', '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 # Pull in Android native toolchain dependencies for Chrome OS too, so we can
# build ARC++ support libraries. # build ARC++ support libraries.
'checkout_android_native_support': 'checkout_android or checkout_chromeos', 'checkout_android_native_support': 'checkout_android or checkout_chromeos',
...@@ -2056,7 +2061,7 @@ hooks = [ ...@@ -2056,7 +2061,7 @@ hooks = [
# Note: On Win, this should run after win_toolchain, as it may use it. # Note: On Win, this should run after win_toolchain, as it may use it.
'name': 'clang', 'name': 'clang',
'pattern': '.', '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. # This is supposed to support the same set of platforms as 'clang' above.
......
...@@ -895,6 +895,15 @@ def UpdateClang(args): ...@@ -895,6 +895,15 @@ def UpdateClang(args):
return 0 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(): def main():
parser = argparse.ArgumentParser(description='Build Clang.') parser = argparse.ArgumentParser(description='Build Clang.')
parser.add_argument('--bootstrap', action='store_true', parser.add_argument('--bootstrap', action='store_true',
...@@ -929,10 +938,12 @@ def main(): ...@@ -929,10 +938,12 @@ def main():
'and using prebuilt cmake binaries') 'and using prebuilt cmake binaries')
parser.add_argument('--verify-version', parser.add_argument('--verify-version',
help='verify that clang has the passed-in 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', parser.add_argument('--without-android', action='store_false',
help='don\'t build Android ASan runtime (linux only)', help='don\'t build Android ASan runtime (linux only)',
dest='with_android', dest='with_android')
default=sys.platform.startswith('linux'))
parser.add_argument('--without-fuchsia', action='store_false', parser.add_argument('--without-fuchsia', action='store_false',
help='don\'t build Fuchsia clang_rt runtime (linux/mac)', help='don\'t build Fuchsia clang_rt runtime (linux/mac)',
dest='with_fuchsia', dest='with_fuchsia',
...@@ -986,9 +997,6 @@ def main(): ...@@ -986,9 +997,6 @@ def main():
PACKAGE_VERSION = CLANG_REVISION + '-0' PACKAGE_VERSION = CLANG_REVISION + '-0'
args.force_local_build = True 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. # Don't build fuchsia runtime on ToT bots at all.
args.with_fuchsia = False 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