forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] remove the android\assets\shrunk directory
Context: dotnet#3753 Context: xamarin/monodroid#1053 There appears to be an issue with mono:2019-10 when the Xamarin.Forms integration project is built with AOT in `Release` mode. The issue somehow stems from two `Mono.Android.dll` existing: * `obj\Debug\android\assets\Mono.Android.dll` * `obj\Debug\android\assets\shrunk\Mono.Android.dll` Looking at how AOT is invoked, it seems like either `Mono.Android.dll` could be picked up by the parameters being passed in. We might be AOT'ing a user's `Foo.dll`, and both directories are in `$MONO_PATH` or passed via other arguments. How would we know which is picked up? The `shrunk` directory is used by the `<RemoveRegisterAttribute/>` MSBuild task that: * Runs after the linker & `<GenerateJavaStubs/>` * Removes all the `[RegisterAttribute]` from types, to further shrink `Mono.Android.dll`. It looks like we copy all `@(_ResolvedFrameworkAssemblies)` to the `shrunk` directory and fix up item groups. Why don't we just get rid of this `shrunk` directory and not copy anything? We can edit `Mono.Android.dll` in place, and incremental builds should be fine due to the use of stamp files. I also moved the flag file to: $(_AndroidStampDirectory)_RemoveRegisterAttribute.stamp To match our new MSBuild conventions. There is also usage of `@(_ShrunkFrameworkAssemblies)` that needs to be updated in monodroid.
- Loading branch information
1 parent
6dbf4d4
commit 3e18d5a
Showing
3 changed files
with
11 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
xamarin/monodroid:master@1b907d680cc6561dcfaddc6f997d2f6ff5456644 | ||
xamarin/monodroid:shrunkframeworkassemblies@326b7fc28ebfc0e630e3383ea5061a3337efe986 | ||
mono/mono:2019-08@8946e49a974ea8b75fe5b8b7e93ffd4571521a85 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters