[mono-runtimes] Use $(IntermediateOutputPath), not `obj`.
One of the "cute" things in mono-runtimes.props is that $(_CommonCFlags) changes based on $(Configuration): for Debug builds, `-O0 -fno-omit-frame-pointer` is used (no optimizations and make stack traces easier for gdb), while for Release builds `-O2` is used. The natural result of this is that Debug and Release builds *are not the same*, and that's a *good* thing. ...except that previously, both Debug and Release builds used the same `obj\%(Identity)` directories, which meant there weren't separate Debug and Release outputs, there were instead "whatever was built first" outputs, which is *madness*. Fix mono-runtimes.targets so that $(IntermediateOutputPath) is used instead instead of `obj`. $(IntermediateOutputPath) should be `obj\$(Configuration)`, so Debug and Release build artifacts will be kept properly separate. Additionally, fix the `Clean` target, so that the $(IntermediateOutputPath) subdirectories are properly removed.
This commit is contained in:
Родитель
d92a49d56a
Коммит
1ecd075b8b
|
@ -16,52 +16,52 @@
|
|||
</Target>
|
||||
<Target Name="_ConfigureRuntimes"
|
||||
Inputs="$(_MonoPath)\configure"
|
||||
Outputs="@(_MonoRuntime->'obj\%(Identity)\.stamp')">
|
||||
<MakeDir Directories="@(_MonoRuntime->'obj\%(Identity)')" />
|
||||
Outputs="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\.stamp')">
|
||||
<MakeDir Directories="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')" />
|
||||
<Exec
|
||||
Command="..\..\$(_MonoPath)\configure LDFLAGS="%(_MonoRuntime.LdFlags)" CFLAGS="%(_MonoRuntime.CFlags)" CXXFLAGS="%(_MonoRuntime.CxxFlags)" CC="%(_MonoRuntime.Cc)" CXX="%(_MonoRuntime.Cxx)" CPP="%(_MonoRuntime.Cpp)" CXXCPP="%(_MonoRuntime.CxxCpp)" LD="%(_MonoRuntime.Ld)" AR="%(_MonoRuntime.Ar)" AS="%(_MonoRuntime.As)" RANLIB="%(_MonoRuntime.RanLib)" STRIP="%(_MonoRuntime.Strip)" --cache-file=..\%(_MonoRuntime.Identity).config.cache %(_MonoRuntime.ConfigureFlags)"
|
||||
WorkingDirectory="@(_MonoRuntime->'obj\%(Identity)')"
|
||||
Command="..\..\..\$(_MonoPath)\configure LDFLAGS="%(_MonoRuntime.LdFlags)" CFLAGS="%(_MonoRuntime.CFlags)" CXXFLAGS="%(_MonoRuntime.CxxFlags)" CC="%(_MonoRuntime.Cc)" CXX="%(_MonoRuntime.Cxx)" CPP="%(_MonoRuntime.Cpp)" CXXCPP="%(_MonoRuntime.CxxCpp)" LD="%(_MonoRuntime.Ld)" AR="%(_MonoRuntime.Ar)" AS="%(_MonoRuntime.As)" RANLIB="%(_MonoRuntime.RanLib)" STRIP="%(_MonoRuntime.Strip)" --cache-file=..\%(_MonoRuntime.Identity).config.cache %(_MonoRuntime.ConfigureFlags)"
|
||||
WorkingDirectory="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')"
|
||||
/>
|
||||
<Touch
|
||||
Files="@(_MonoRuntime->'obj\%(Identity)\.stamp')"
|
||||
Files="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\.stamp')"
|
||||
AlwaysCreate="True"
|
||||
/>
|
||||
</Target>
|
||||
<Target Name="_BuildRuntimes"
|
||||
Inputs="@(_MonoRuntime->'obj\%(Identity)\.stamp')"
|
||||
Outputs="@(_MonoRuntime->'obj\%(Identity)\mono\mini\.libs\%(OutputRuntime)');@(_MonoRuntime->'obj\%(Identity)\mono\profiler\.libs\%(OutputProfiler)');@(_MonoRuntime->'obj\%(Identity)\support\.libs\%(OutputMonoPosixHelper)')">
|
||||
Inputs="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\.stamp')"
|
||||
Outputs="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\mini\.libs\%(OutputRuntime)');@(_MonoRuntime->'obj\%(Identity)\mono\profiler\.libs\%(OutputProfiler)');@(_MonoRuntime->'obj\%(Identity)\support\.libs\%(OutputMonoPosixHelper)')">
|
||||
<Exec
|
||||
Command="make $(MAKEFLAGS) # %(_MonoRuntime.Identity)"
|
||||
WorkingDirectory="@(_MonoRuntime->'obj\%(Identity)')"
|
||||
WorkingDirectory="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')"
|
||||
/>
|
||||
</Target>
|
||||
<Target Name="_InstallRuntimes"
|
||||
Inputs="@(_MonoRuntime->'obj\%(Identity)\mono\mini\.libs\%(OutputRuntime)');@(_MonoRuntime->'obj\%(Identity)\mono\profiler\.libs\%(OutputProfiler)');@(_MonoRuntime->'obj\%(Identity)\support\.libs\%(OutputMonoPosixHelper)')"
|
||||
Inputs="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\mini\.libs\%(OutputRuntime)');@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\profiler\.libs\%(OutputProfiler)');@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\support\.libs\%(OutputMonoPosixHelper)')"
|
||||
Outputs="@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntime)');@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputProfiler)');@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputMonoPosixHelper)')">
|
||||
<MakeDir Directories="@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)')" />
|
||||
<Copy
|
||||
SourceFiles="@(_MonoRuntime->'obj\%(Identity)\mono\mini\.libs\%(OutputRuntime)')"
|
||||
SourceFiles="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\mini\.libs\%(OutputRuntime)')"
|
||||
DestinationFiles="@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntime)')"
|
||||
/>
|
||||
<Touch
|
||||
Files="@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntime)')"
|
||||
/>
|
||||
<Copy
|
||||
SourceFiles="@(_MonoRuntime->'obj\%(Identity)\mono\mini\.libs\%(OutputRuntime)')"
|
||||
SourceFiles="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\mini\.libs\%(OutputRuntime)')"
|
||||
DestinationFiles="@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntime)-unstripped')"
|
||||
/>
|
||||
<Exec
|
||||
Command="%(_MonoRuntime.Strip) "@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntime)')""
|
||||
/>
|
||||
<Copy
|
||||
SourceFiles="@(_MonoRuntime->'obj\%(Identity)\mono\profiler\.libs\%(OutputProfiler)')"
|
||||
SourceFiles="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\mono\profiler\.libs\%(OutputProfiler)')"
|
||||
DestinationFiles="@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputProfiler)')"
|
||||
/>
|
||||
<Touch
|
||||
Files="@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputProfiler)')"
|
||||
/>
|
||||
<Copy
|
||||
SourceFiles="@(_MonoRuntime->'obj\%(Identity)\support\.libs\%(OutputMonoPosixHelper)')"
|
||||
SourceFiles="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\support\.libs\%(OutputMonoPosixHelper)')"
|
||||
DestinationFiles="@(_MonoRuntime->'$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputMonoPosixHelper)')"
|
||||
/>
|
||||
<Touch
|
||||
|
@ -89,4 +89,8 @@
|
|||
Files="$(OutputPath)\lib\xbuild-frameworks\MonoAndroid\v1.0\mscorlib.dll"
|
||||
/>
|
||||
</Target>
|
||||
<Target Name="_CleanRuntimes"
|
||||
AfterTargets="Clean">
|
||||
<RemoveDir Directories="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче