Skip to content

Commit c916aee

Browse files
[NativeAOT] Restore NativeAOT-requires-trimmable build error
The <Error> guarding NativeAOT against a non-trimmable typemap was dropped when [NativeAOT] Make the trimmable typemap the default was replayed onto main, because main had wrapped the typemap validation in the new _ValidateAndroidTypeMapImplementation target. Re-add it there. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent adb00e4 commit c916aee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,6 +2948,8 @@ because xbuild doesn't support framework reference assemblies.
29482948
BeforeTargets="_CheckForInvalidConfigurationAndPlatform">
29492949
<Error Condition=" '$(_AndroidTypeMapImplementation)' != '' and '$(_AndroidTypeMapImplementation)' != 'llvm-ir' and '$(_AndroidTypeMapImplementation)' != 'managed' and '$(_AndroidTypeMapImplementation)' != 'trimmable' "
29502950
Text="Invalid value for _AndroidTypeMapImplementation: '$(_AndroidTypeMapImplementation)'. Valid values are: llvm-ir, managed, trimmable." />
2951+
<Error Condition=" '$(_AndroidRuntime)' == 'NativeAOT' and '$(_AndroidTypeMapImplementation)' != 'trimmable' "
2952+
Text="NativeAOT requires _AndroidTypeMapImplementation=trimmable." />
29512953
</Target>
29522954

29532955
<Target Name="_LinkAssemblies"

0 commit comments

Comments
 (0)