Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2360)

Unified Diff: build/download_nacl_toolchains.py

Issue 266353011: Chromium no longer needs to extract toolchains during runhooks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nacl_integration uses scons so should continue to extract toolchains Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/download_nacl_toolchains.py
diff --git a/build/download_nacl_toolchains.py b/build/download_nacl_toolchains.py
index 4895c1a3fdd1bde1b3cc420008d56ce3731e328f..3d6c64fc33f8baaf5d167fbe0fa4b5e7fc6dbe2f 100755
--- a/build/download_nacl_toolchains.py
+++ b/build/download_nacl_toolchains.py
@@ -6,6 +6,7 @@
"""Shim to run nacl toolchain download script only if there is a nacl dir."""
import os
+import shutil
import sys
@@ -50,8 +51,18 @@ def Main(args):
args.extend(['--exclude', 'nacl_arm_newlib'])
args.append('sync')
- args.append('--extract')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698