Skip to content

[DependencyScanning] Use clang scanner callback to speed up bridging #81454

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cachemeifyoucan
Copy link
Contributor

@cachemeifyoucan cachemeifyoucan commented May 12, 2025

Use the new callback function in clang scanner to transform the build command to speed up the build. Currently, there is quite some overhead to round-trip all the clang module build commands in order to transform them for swift builds using a single thread. The API allows cheap command-line transform through clang::CompilerInvocation interface.

rdar://151705822

@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#10667

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan force-pushed the clang-scanner-invocation-callback branch from cc78976 to 482f194 Compare May 13, 2025 22:59
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#10667

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#10667

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan force-pushed the clang-scanner-invocation-callback branch from 0aba426 to 8072d19 Compare May 15, 2025 21:10
@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#10667

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#10667

@swift-ci please smoke test macOS platform

1 similar comment
@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#10667

@swift-ci please smoke test macOS platform

Use the underlying compiler invocation inside module scanning result to
speed up the clang module dependency bridging. This avoids converting
cc1 arguments to compiler invocation and back, just to modify the cc1
arguments needed for building PCM using swift-frontend.

rdar://151705822
@cachemeifyoucan cachemeifyoucan force-pushed the clang-scanner-invocation-callback branch from 8072d19 to 391446d Compare May 20, 2025 16:55
@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#10667

@swift-ci please smoke test macOS platform

@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#10667

@swift-ci please smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant