Skip to content

[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

Merged
merged 2 commits into from
Oct 4, 2017

Conversation

harlanhaskins
Copy link
Contributor

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.

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')
Copy link
Contributor Author

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?

Copy link
Contributor

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?

Copy link
Contributor Author

@harlanhaskins harlanhaskins Oct 2, 2017

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?

Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@harlanhaskins
Copy link
Contributor Author

@davezarzycki This now builds with the "quick-debug" script:

time nice ./utils/build-script \                                                 
  --build-subdir="$(dirname $PWD)/d" \                                           
  --llvm-targets-to-build X86 \                                                  
  --skip-ios --skip-tvos --skip-watchos \                                        
  --skip-build-benchmarks \                                                      
  --build-swift-static-stdlib false \                                            
  --build-swift-static-sdk-overlay false \                                       
  --build-swift-dynamic-sdk-overlay false \                                      
  --build-swift-stdlib-unittest-extra false \                                    
  -r \                                                                           
  --debug-swift \                                                                
  --debug-swift-stdlib
13809.10s user 626.79s system 641% cpu 37:31.85 total

@harlanhaskins
Copy link
Contributor Author

@swift-ci please clean test

@harlanhaskins
Copy link
Contributor Author

@swift-ci please clean test

@harlanhaskins
Copy link
Contributor Author

Will merge once this final CI run passes.

@harlanhaskins harlanhaskins merged commit 1d2d0a6 into swiftlang:master Oct 4, 2017
@harlanhaskins harlanhaskins deleted the 24-hour-layover branch October 4, 2017 19:30
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.

3 participants