Skip to content

Commit 58b5641

Browse files
cleanup clang cache before firing off list builder (#960)
1 parent af94337 commit 58b5641

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

runner.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import argparse
1717
import json
1818
import sys
19+
import os
20+
import shutil
1921

2022
import common
2123
import project
@@ -42,6 +44,12 @@ def main():
4244
xcodebuild_flags = args.add_xcodebuild_flags
4345
xcodebuild_flags += (' ' if xcodebuild_flags else '') + 'DEBUG_INFORMATION_FORMAT=dwarf'
4446

47+
# Cleanup clang Module cache from any recently built clang compilers to prevent swift
48+
# project build failures
49+
for root, dirs, files in os.walk("/var/folders"):
50+
if root.endswith("/clang/ModuleCache") and os.path.isdir(root):
51+
shutil.rmtree(root)
52+
4553
# Use clang for building xcode projects.
4654
if args.clang:
4755
xcodebuild_flags += ' CC=%s' % args.clang

0 commit comments

Comments
 (0)