Skip to content

cleanup clang cache before firing off list builder #960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import argparse
import json
import sys
import os
import shutil

import common
import project
Expand All @@ -42,6 +44,12 @@ def main():
xcodebuild_flags = args.add_xcodebuild_flags
xcodebuild_flags += (' ' if xcodebuild_flags else '') + 'DEBUG_INFORMATION_FORMAT=dwarf'

# Cleanup clang Module cache from any recently built clang compilers to prevent swift
# project build failures
for root, dirs, files in os.walk("/var/folders"):
if root.endswith("/clang/ModuleCache") and os.path.isdir(root):
shutil.rmtree(root)

# Use clang for building xcode projects.
if args.clang:
xcodebuild_flags += ' CC=%s' % args.clang
Expand Down