Support loading ICU data from managed Interop (#49406)
authorSteve Pfister <steveisok@users.noreply.github.com>
Sat, 13 Mar 2021 15:32:45 +0000 (10:32 -0500)
committerGitHub <noreply@github.com>
Sat, 13 Mar 2021 15:32:45 +0000 (10:32 -0500)
commit1d9c402291fb65c84aa532e6e1657d4624228856
treea47e9a3a98232506d3408d2443664d1797752a2b
parent6791d05494f5aa4d1a789525c2708e775aafdc07
Support loading ICU data from managed Interop (#49406)

In iOS we support loading a custom dat file when working with ICU.  The way this worked originally was the mono runtime exported a function that native code would call into (similar to wasm).  After thinking about it a bit, it makes more sense to load this the same way we do on desktop, but with the ability to provide the path to an ICU dat file via an AppContext key `ICU_DAT_FILE_PATH`.  This can be provided before Xamarin iOS calls `monovm_initialize` and they won't have to worry about calling some special function.
12 files changed:
src/libraries/Common/src/Interop/Interop.ICU.iOS.cs [new file with mode: 0644]
src/libraries/Native/Unix/System.Globalization.Native/entrypoints.c
src/libraries/Native/Unix/System.Globalization.Native/pal_icushim.h
src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_static.c
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.LoadICU.Unix.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.LoadICU.iOS.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationMode.Unix.cs
src/mono/mono/mini/CMakeLists.txt
src/tasks/AppleAppBuilder/AppleAppBuilder.cs
src/tasks/AppleAppBuilder/Templates/runtime.m
src/tasks/AppleAppBuilder/Xcode.cs