Skip to content

Commit fbd01f0

Browse files
committed
Fix build script
1 parent 50a12a4 commit fbd01f0

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

tools/setup.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,15 @@ def patch_clang(remake_diffs=False):
9898

9999
def check_diff_applied_status():
100100
status = {}
101-
for src in PATCH_SOURCE_DIR.iterdir():
102-
if not src.is_file():
103-
continue
104-
105-
target_file = TOOLCHAIN_DIR / src.name
106-
checksum_file = PATCH_DEST_DIR / f"{src.name}.sha256"
101+
for diff_file in PATCH_DEST_DIR.glob("*.diff"):
102+
dst_name = diff_file.stem
103+
target_file = TOOLCHAIN_DIR / dst_name
104+
checksum_file = PATCH_DEST_DIR / f"{dst_name}.sha256"
107105
if not checksum_file.exists():
108-
status[src.name] = False
106+
status[dst_name] = False
109107
continue
110108
expected_hash = checksum_file.read_text().splitlines()[-1].split("after: ")[-1]
111-
status[src.name] = is_diff_applied(target_file, expected_hash)
109+
status[dst_name] = is_diff_applied(target_file, expected_hash)
112110
return status
113111

114112

0 commit comments

Comments
 (0)