diff options
author | ncbray <ncbray@chromium.org> | 2015-01-05 14:04:22 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-05 22:05:10 +0000 |
commit | 474ab324d17d2cd198d3fb067cabc10a775a8df7 (patch) | |
tree | 7d4352721e6aff0c3ef66ac36f91cfa0b5b038ae /build | |
parent | 28d835c99187922d671e2ba89347bc6165a59b8b (diff) | |
download | chromium_src-474ab324d17d2cd198d3fb067cabc10a775a8df7.zip chromium_src-474ab324d17d2cd198d3fb067cabc10a775a8df7.tar.gz chromium_src-474ab324d17d2cd198d3fb067cabc10a775a8df7.tar.bz2 |
Increase flexibility for NaCl toolchain download script.
Passing arguments in from the DEPS file makes it easier to configure the
download. The main intent of this change is to make it easier to extract
the NaCl toolchain immedately after downloading it in the Mojo repo.
Currently Chromium does not need to extract the toolchain immedately, and
this would require ~920MB of disk space, so this refactoring makes
extraction possible but optional. Eventually Chromium will extract the
toolchain immedately, but this will require a deeper rework of the GYP
build.
BUG=https://code.google.com/p/chromium/issues/detail?id=401761
Review URL: https://codereview.chromium.org/811593005
Cr-Commit-Position: refs/heads/master@{#309963}
Diffstat (limited to 'build')
-rwxr-xr-x | build/download_nacl_toolchains.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/build/download_nacl_toolchains.py b/build/download_nacl_toolchains.py index 7402689..b99b940 100755 --- a/build/download_nacl_toolchains.py +++ b/build/download_nacl_toolchains.py @@ -42,28 +42,16 @@ def Main(args): if use_pnacl: print '\n*** DOWNLOADING PNACL TOOLCHAIN ***\n' else: - args.extend(['--exclude', 'pnacl_newlib']) + args = ['--exclude', 'pnacl_newlib'] + args # Only download the ARM gcc toolchain if we are building for ARM # TODO(olonho): we need to invent more reliable way to get build # configuration info, to know if we're building for ARM. if 'target_arch=arm' not in os.environ.get('GYP_DEFINES', ''): - args.extend(['--exclude', 'nacl_arm_newlib']) + args = ['--exclude', 'nacl_arm_newlib'] + args - args.extend(['--mode', 'nacl_core_sdk']) - args.append('sync') package_version.main(args) - # Because we are no longer extracting the toolchain, it is best to delete - # the old extracted ones so that no stale toolchains are left behind. This - # also would catch any stale code that happens to work because it is using - # an old extracted toolchain that was left behind. - toolchain_dir = os.path.join(nacl_dir, 'toolchain') - for toolchain_item in os.listdir(toolchain_dir): - toolchain_path = os.path.join(toolchain_dir, toolchain_item) - if os.path.isdir(toolchain_path) and not toolchain_item.startswith('.'): - shutil.rmtree(toolchain_path) - return 0 |