Index: build/download_nacl_toolchains.py |
diff --git a/build/download_nacl_toolchains.py b/build/download_nacl_toolchains.py |
index 2fdfa00f37c7fa9f72db6ed79c3c88ca25ae74f2..0e6e7d4b15a1806ed39938a3e03eb646cb4b7d8e 100755 |
--- a/build/download_nacl_toolchains.py |
+++ b/build/download_nacl_toolchains.py |
@@ -13,6 +13,7 @@ def Main(args): |
# Exit early if disable_nacl=1. |
if 'disable_nacl=1' in os.environ.get('GYP_DEFINES', ''): |
return 0 |
+ |
script_dir = os.path.dirname(os.path.abspath(__file__)) |
src_dir = os.path.dirname(script_dir) |
nacl_dir = os.path.join(src_dir, 'native_client') |
@@ -34,8 +35,16 @@ def Main(args): |
# gclient sync time for developers, or standard Chrome bots. |
if '--optional-pnacl' in args: |
args.remove('--optional-pnacl') |
+ # By default we don't use PNaCl toolchain yet, unless on ARM, where |
+ # there is no other toolchain to build untrusted code at the moment. |
+ # So analyze if we're building for ARM, or on SDK buildbot. |
+ use_pnacl = False |
+ if 'target_arch=arm' in os.environ.get('GYP_DEFINES', ''): |
Mark Seaborn
2012/03/28 14:59:24
Hmm, this is a horrible hack that doesn't work if
Nikolay
2012/03/29 14:36:07
Agree, but fortunately this hack also matches the
davidjames
2012/03/29 17:30:24
What changes need to be made to the CrOS ebuild to
Nikolay
2012/03/30 14:02:11
See https://chromiumcodereview.appspot.com/9923012
Nikolay
2012/04/02 08:32:13
Was told that need to use gerrit here, so please s
|
+ use_pnacl = True |
buildbot_name = os.environ.get('BUILDBOT_BUILDERNAME', '') |
if buildbot_name.find('pnacl') >= 0 and buildbot_name.find('sdk') >= 0: |
+ use_pnacl = True |
+ if use_pnacl: |
print '\n*** DOWNLOADING PNACL TOOLCHAIN ***\n' |
else: |
args.append('--no-pnacl') |
@@ -46,4 +55,3 @@ def Main(args): |
if __name__ == '__main__': |
sys.exit(Main(sys.argv[1:])) |
- |