msbuild: fix overbuilding of externals and lessen rebuild likelyhood #10933
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.
This partially reverts #9092 (which created
Externals\ExternalsReferenceAll.props)Instead, Externals now "publish"
exports.propsfiles that referencing projects can import in order to 1) reference the project (for dependency graph) and 2) include anyClCompilesettings (+etc) exported by the external (used for include directories and definitions).This also splits some of
Base.propsout into a seperate file, such thatBase.propsis now only for truly global settings, whereas the new file is for settings shared between dolphin-authored code (but not Externals).While working on PRs recently, I've noticed that msbuild would sometimes overbuild after making small edits. This PR should fix that (please let me know if you ever see such a thing). It also makes rebuilds of Externals less likely, as
Base.propsdoes not need to be edited as frequently. The new behavior is also more correct in the sense that include paths and definitions for all External libraries are not broadcast into everything (fun fact: this was extremely vestigial dolphin behavior, based on how SCons was setup, when dolphin used that).For full rebuilds, there is a slight perf regression for machines with a lot of cpu cores (like, > 32). However, with some tips from https://devblogs.microsoft.com/cppblog/cpp-build-throughput-investigation-and-tune-up speed can be regained if needed. I also realized most people building dolphin don't have such machines, and would rather use less resources by default (oops..)