build_rust.py: Fix typo when deleting the build dir
Followup to crrev.com/c/5606683
Bug: 343232416
Change-Id: I8e74688a3681ae55ab0993de649076f35455a6d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5614052
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312737}
NOKEYCHECK=True
GitOrigin-RevId: 5795c61c76f37835bc40e20586ac1501f70162bc
diff --git a/build_rust.py b/build_rust.py
index f09f890..9025316 100755
--- a/build_rust.py
+++ b/build_rust.py
@@ -108,6 +108,7 @@
'github.com/rust-lang/rust')
RUST_SRC_DIR = os.path.join(THIRD_PARTY_DIR, 'rust-src')
+RUST_BUILD_DIR = os.path.join(RUST_SRC_DIR, 'build')
RUST_BOOTSTRAP_DIST_RS = os.path.join(RUST_SRC_DIR, 'src', 'bootstrap',
'dist.rs')
STAGE0_JSON_PATH = os.path.join(RUST_SRC_DIR, 'src', 'stage0.json')
@@ -802,8 +803,8 @@
# Delete the build directory.
if not args.skip_clean:
print('Clearing build directory...')
- if os.path.idsir(os.path.join(RUST_SRC_DIR, "buid")):
- shutil.rmtree(os.path.join(RUST_SRC_DIR, "build"))
+ if os.path.idsir(BUILD_DIR):
+ shutil.rmtree(BUILD_DIR)
if not args.skip_test:
print(f'Building stage 2 artifacts and running tests...')