Skip to content

[regression]libFoundation.so must also be built on issuing 'ninja test' #1073

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
Jun 26, 2017

Conversation

pushkarnk
Copy link
Member

@pushkarnk pushkarnk commented Jun 25, 2017

This fixes a build behaviour change caused by #1012 which in turn was created to fix a behaviour change caused by #873

#873 enabled building a static Foundation library. In the build scripts parlance, with this change we had two "products" - the dynamic library (libFoundation.so) and a new static library (libFoundation.a). Build rules for all the "phases" and "dependencies" were generated both these products and we hence ended in duplicates. This is what #1012 attempted to eliminate.

But there was an issue with #1012. With this, build rules for the various dependencies and phases were generated only in the context of the static library product libFoundation.a. These objects generated by these for reused for the dynamic library product libFoundation.so. This unintended consequence of this was that dependencies like TestFoundation -> libFoundation.so were not catered to.

This led to a behaviour change. While the command 'ninja' built libFoundation.so, the command ninja test did not. This is not the expected behaviour. We've always had libFoundation.so being built before TestFoundation on the ninja test command.

This PR rectifies that particular issue in #1012 Instead of generating rules for phases & dependencies in libFoundation.a we do that for the product libFoundation.so and subsequently reuse them in building libFoundation.a.

Issuing ninja test will now build libFoundation.so before TestFoundation. Issuing ninja will build both libFoundation.so and libFoundation.a.

@pushkarnk pushkarnk requested review from parkera and phausler June 25, 2017 11:19
@parkera
Copy link
Contributor

parkera commented Jun 26, 2017

@swift-ci test and merge

@swift-ci swift-ci merged commit 37927d3 into swiftlang:master Jun 26, 2017
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