Windows msbuild triggers too much to rebuild.
authorlateralusX <lateralusx.github@gmail.com>
Wed, 22 Mar 2017 10:52:42 +0000 (11:52 +0100)
committerlateralusX <lateralusx.github@gmail.com>
Wed, 22 Mar 2017 10:52:42 +0000 (11:52 +0100)
commit15277e6bd6510e63323941ad927c704092f50511
treecf84e1b8e0a2b34356a80219ef1683f903b7abcc
parent1006d04ff640f9af73d7cdd1aa12d5fe6ae333ac
Windows msbuild triggers too much to rebuild.

When building mono solution from Visual Studio it correctly handles incremental
builds just rebuilding what's needed. When doing the same from msbuild it rebuilds
to much. This happens due to two different issues.

First, a change in winconfig.h setting up a define for corlib version was not
included in our compare config file script, so diff was detected as a change in
config file causing a replace of config.h triggering a complete rebuild.

Second, once above was fixed there was still a rebuild of mini-amd64.c when not needed.
This was due to a difference in how post build events are handled in Visual Studio
and msbuild. Visual Studio will detect that the complete project won't need to be
rebuild and then it doesn't trigger any of the events. msbuild on the other hand
will trigger events even if nothing needs to be rebuild and that triggered creation of cpu-amd64.h
that in turn will trigger rebuild of mini-amd64.c. Switching from post build event
to a custom build step with proper input/output files will work as expected in both
Visual Studio and msbuild.

Commit also disables the build of test projects that are part of solution
but won't provide any build output. These projects are mainly there to make launching of test
configurations easier and doesn't need to be included in solution build.
msvc/compare-config-files.ps1
msvc/genmdesc.vcxproj
msvc/libmono-static.vcxproj
msvc/mono.sln