Skip to content

Commit

Permalink
[mono-runtimes] Fix bundle usage
Browse files Browse the repository at this point in the history
Commit 34f437d inadvertently broke mono bundle usage. For example,
the [first commit after the mono bump][xa-01be] *should* have taken
around 3h to build. Instead, it took nearly 7h, because the bundle
wasn't being used, causing the mono runtimes to be rebuilt:

[xa-01be]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/874/

	Target _BuildUnlessCached needs to be built as output file
	'…/xamarin-android//bin/Debug/lib/xamarin.android//../../bcl-tests/System.Runtime.CompilerServices.Unsafe.pdb'
	does not exist.

Indeed, `System.Runtime.CompilerServices.Usafe.pdb` *doesn't* exist,
nor should it, as it's compiled from IL directly.

Fix mono bundle usage by updating `@(_BclTestAssemblyDestination)` to
exclude `System.Runtime.CompilerServices.Unsafe.pdb`. This allows the
`_BuildUnlessCached` target to properly recognize that all required
files *do* exist, thus skipping the mono-runtimes build (as desired).
  • Loading branch information
jonpryor committed Feb 15, 2018
1 parent 01be8ac commit 92949f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-tools/mono-runtimes/mono-runtimes.targets
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
<_BclExcludeDebugSymbols Include="System.Windows.dll" />
<_BclExcludeDebugSymbols Include="System.Xml.Serialization.dll" />
<_BclTestAssemblyDestination Include="@(MonoTestAssembly->'$(XAInstallPrefix)\..\..\bcl-tests\%(Identity)')" />
<_BclTestAssemblyDestination Include="@(MonoTestAssembly->'$(XAInstallPrefix)\..\..\bcl-tests\%(Filename).pdb')" />
<_BclTestAssemblyDestination
Include="@(MonoTestAssembly->'$(XAInstallPrefix)\..\..\bcl-tests\%(Filename).pdb')"
Exclude="$(XAInstallPrefix)\..\..\bcl-tests\System.Runtime.CompilerServices.Unsafe.pdb"
/>
<_BclTestAssemblyDestination Include="@(MonoTestRunner->'$(XAInstallPrefix)\..\..\bcl-tests\%(Identity)')" />
<_BclTestAssemblyDestination Include="@(MonoTestRunner->'$(XAInstallPrefix)\..\..\bcl-tests\%(Filename).pdb')" />
</ItemGroup>
Expand Down

0 comments on commit 92949f4

Please sign in to comment.