Skip to content

Commit e9bb8a1

Browse files
committed
Fix incremental builds
Our newlib patch now includes a file that maches a .gitignore pattern, so it is not removed by 'git reset --hard' and patch application fails in incremental builds. This commit adds a 'git clean -fX' command to remove the file before applying the patch.
1 parent 3bcd628 commit e9bb8a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/repos.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ def patch_repositories(checkout_path: str, tc_version: LLVMBMTC,
239239
repo = git.Repo(repo_path)
240240
try:
241241
repo.head.reset(index=True, working_tree=True)
242+
# Remove ignored files (our newlib patch contains one)
243+
repo.git.clean(['-fX'])
242244
repo.git.apply(['-p1', patch_file])
243245
except git.exc.GitCommandError as ex: # pylint: disable=no-member
244246
die('could not patch "{}" with "{}".\n'

0 commit comments

Comments
 (0)