[regression]libFoundation.so must also be built on issuing 'ninja test' #1073
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 productlibFoundation.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 commandninja test
did not. This is not the expected behaviour. We've always had libFoundation.so being built before TestFoundation on theninja 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 productlibFoundation.so
and subsequently reuse them in buildinglibFoundation.a
.Issuing
ninja test
will now buildlibFoundation.so
beforeTestFoundation
. Issuingninja
will build bothlibFoundation.so
andlibFoundation.a
.