-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CMake] Only build SwiftSyntax if building SDK overlays #12141
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
SwiftSyntax depends on Foundation, which depends on the SDK overlays being built. However, the existing build configuration tried to build SwiftSyntax even if the SDK overlays were not built. Ensure we're building overlays before building SwiftSyntax, and guard tests with an sdk_overlay test.
test/lit.cfg
Outdated
@@ -295,6 +295,10 @@ sdk_overlay_linker_opt = "" | |||
sdk_overlay_dir_opt = "" | |||
test_sdk_overlay_dir = lit_config.params.get('test_sdk_overlay_dir', None) | |||
if test_sdk_overlay_dir is not None: | |||
|
|||
# TODO: Is this the right place to put this? | |||
config.available_features.add('sdk_overlay') |
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.
@gottesmm Is this the right place to add the sdk_overlay
feature?
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.
What's blocking this PR from being merged?
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 suppose that's the right place for this. I'll remove the comment and merge.
Ideally we can pair this with a build system unit test. @Rostepher is that currently possible?
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'm not sure I understand what you mean by a build-system unit test in this context? What behavior do you want to test?
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.
@harlanhaskins – Based on @Rostepher's reply, what do you think about merging this now and worrying about how to unit test the build script later?
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'll go ahead and merge it and follow up offline with @Rostepher about how to build this unit test.
@davezarzycki This now builds with the "quick-debug" script:
|
@swift-ci please clean test |
@swift-ci please clean test |
Will merge once this final CI run passes. |
SwiftSyntax depends on Foundation, which depends on the SDK overlays
being built. However, the existing build configuration tried to build
SwiftSyntax even if the SDK overlays were not built. Ensure we're
building overlays before building SwiftSyntax, and guard tests with an
sdk_overlay
test.Resolves SR-6008.