Skip to content

Commit

Permalink
Fixing tests on android. (dotnet#36788)
Browse files Browse the repository at this point in the history
The linker was removing the icu shim functions even exporting them. The unique solution that we found until now is to force the linking using the -u flag.
This is a temporary fix until we don't implement QCalls.
Fixes dotnet#36685
  • Loading branch information
thaystg authored May 21, 2020
1 parent c1052b4 commit 45e2047
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/native-library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ lookup_pinvoke_call_impl (MonoMethod *method, MonoLookupPInvokeStatus *status_ou
new_scope = g_strdup ("libcoreclr.dylib");
#else
#if defined(TARGET_ANDROID)
new_scope = g_strdup ("libmonosgen-2.0.so");
new_scope = g_strdup ("libruntime-android.so");
#else
new_scope = g_strdup ("libcoreclr.so");
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@ target_link_libraries(
runtime-android
%NativeLibrariesToLink%
libz.so
log)
log
"-u GlobalizationNative_LoadICU"
"-u GlobalizationNative_GetLatestJapaneseEra"
"-u GlobalizationNative_ChangeCase"
"-u GlobalizationNative_CloseSortHandle"
"-u GlobalizationNative_GetLocales"
"-u GlobalizationNative_GetLocaleInfoInt"
"-u GlobalizationNative_GetLocaleTimeFormat"
"-u GlobalizationNative_ToUnicode"
"-u GlobalizationNative_NormalizeString"
"-u GlobalizationNative_GetTimeZoneDisplayName")

0 comments on commit 45e2047

Please sign in to comment.