[Xamarin.Android.Build.Tasks] Hitting "System.IO.IOException: Too many open files" when building a large app with AOT and all supported architectures (#493) #516
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.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=53122
There is a problem with libzip in that is does not have an
API for Flushing the current items in memory to disk.
This was why ZipArchiveEx was introduced in commit 9166e03.
This commit reworks the BuildApk task to make sure of this
new functinality and to periodically flush the zip to disk.
This will reduce the chances of running out of memory.
It also adds a unit test which generates and builds an app
which has a large number of refernces and assets. This app
also gets AOT'd so it should be pushing the system to the limit.
Also added code to make sure the cross tools and llc have
execute permissions.
Added code to make sure we dispose of each process in the Aapt and
Aot tasks. This is to ensure any files or pipes these processed have
are removed as soon as possible.
Updated the unix-distribution-setup.targets to ensure that the cross-arm
tooling and llc have the correct execute permissions on MacOS and Linux.