Commit 296d854
[Xamarin.Android.Build.Tasks] Hitting "System.IO.IOException: Too many open files" when building a large app with AOT and all supported architectures (#493)
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.1 parent 766c55a commit 296d854
File tree
8 files changed
+270
-87
lines changed- build-tools/unix-distribution-setup
- src/Xamarin.Android.Build.Tasks
- Tasks
- Tests
- Xamarin.Android.Build.Tests
- Xamarin.ProjectTools/Common
- Utilities
8 files changed
+270
-87
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
437 | 439 | | |
438 | 440 | | |
439 | 441 | | |
| |||
453 | 455 | | |
454 | 456 | | |
455 | 457 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
466 | 484 | | |
467 | 485 | | |
468 | 486 | | |
| |||
0 commit comments