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

Unified Diff: build/landmines.py

Issue 963433002: Make landmines delete all generated build artifacts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Wrong scope Created 5 years, 10 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/landmines.py
diff --git a/build/landmines.py b/build/landmines.py
index d855315ee9e52826b62dd17ed9dd2b2a52a1516c..97c63901c1a904702017453877bb9e619f66469f 100755
--- a/build/landmines.py
+++ b/build/landmines.py
@@ -166,17 +166,27 @@ def clobber_if_necessary(new_landmines):
for f in os.listdir(out_dir):
path = os.path.join(out_dir, f)
if os.path.basename(out_dir) == 'build':
- # Soft version of chromium's clobber. Only delete build directories not
- # files in windows' build dir as the folder shares some checked out
- # files and directories.
+ # Only delete build directories and files for MSVS builds as the folder
+ # shares some checked out files and directories.
if (os.path.isdir(path) and
re.search(r'(?:[Rr]elease)|(?:[Dd]ebug)', f)):
delete_build_dir(path)
+ elif (os.path.isfile(path) and
+ (path.endswith('.sln') or
+ path.endswith('.vcxproj') or
+ path.endswith('.vcxproj.user'))):
+ os.unlink(path)
else:
if os.path.isfile(path):
os.unlink(path)
elif os.path.isdir(path):
delete_build_dir(path)
+ if os.path.basename(out_dir) == 'xcodebuild':
+ # Xcodebuild puts an additional project file structure into build,
+ # while the output folder is xcodebuild.
+ project_dir = os.path.join(SRC_DIR, 'build', 'all.xcodeproj')
+ if os.path.exists(project_dir) and os.path.isdir(project_dir):
+ delete_build_dir(project_dir)
# Save current set of landmines for next time.
with open(landmines_path, 'w') as f:
« 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