-
Notifications
You must be signed in to change notification settings - Fork 203
Implement swift_build_sdk_interfaces.py using libSwiftDriver #579
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
Conversation
@swift-ci please test |
} | ||
|
||
func addCommonFlags(commandLine: inout [Job.ArgTemplate]) { | ||
commandLine.appendFlag(.buildModuleFromParseableInterface) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny nitpick: the current version of this is compile-module-from-interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
af4afcb
to
73d943a
Compare
816d5b9
to
8ec2adb
Compare
@@ -21,6 +21,9 @@ let package = Package( | |||
.executable( | |||
name: "swift-help", | |||
targets: ["swift-help"]), | |||
.executable( | |||
name: "swift-build-sdk-interfaces", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some changes in build-script-helper.py
are required to make sure this gets installed when built with build-script
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, will make those build-script/cmake changes later.
48326b9
to
e0caa90
Compare
a9ab8af
to
007cb7a
Compare
@swift-ci please test |
007cb7a
to
20e570d
Compare
@swift-ci please test |
881ebf1
to
2e34250
Compare
This PR is an implementation of swift_build_sdk_interfaces.py using libSwiftDriver. The tool is used to traverse an entire SDK to find Swift interface files and to generate prebuilt module cache for each one of them. Comparing to the python implementation, this implementation generates the prebuilt modules in the dependency order so that: (1) It's more performant than the python counterpart. Several preliminary experiments showed an average of 40% less CPU time spent on generating modules in an SDK. (2) It fails fast. If an interface is broken in the SDK, this new implementation won't schedule jobs for building other modules depending on this interface. It should help us avoid issues like rdar://76201633
2e34250
to
037aede
Compare
@swift-ci please test |
This PR is an implementation of swift_build_sdk_interfaces.py using
libSwiftDriver. The tool is used to traverse an entire SDK to find
Swift interface files and to generate prebuilt module cache for each one
of them. Comparing to the python implementation, this implementation generates
the prebuilt modules in the dependency order so that:
(1) It's more performant than the python counterpart. Several preliminary
experiments showed an average of 40% less CPU time spent on generating modules in an SDK.
(2) It fails fast. If an interface is broken in the SDK, this new implementation
won't schedule jobs for building other modules depending on this interface. It should help us avoid
issues like rdar://76201633