Commit 4accd2cb authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

[tools] fix clang update script for clang download failure

If update script failed while downloading clang, this script left
inconsistency state between stamp and clang state (crbug.com/968765).

Let me remove directory having stamp so that next update
correctly downloads clang when previous download failed.

Bug: 968821
Change-Id: I095e4b037b9f513908551dfb1eee2496ace5936a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635087Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665119}
parent 9510e97e
......@@ -248,8 +248,8 @@ def UpdateClang():
if ReadStampFile(STAMP_FILE) == expected_stamp:
return 0
if os.path.exists(LLVM_BUILD_DIR):
RmTree(LLVM_BUILD_DIR)
if os.path.exists(os.path.dirname(LLVM_BUILD_DIR)):
RmTree(os.path.dirname(LLVM_BUILD_DIR))
DownloadAndUnpackClangPackage(sys.platform, LLVM_BUILD_DIR)
if 'win' in target_os:
......
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