Skip to content

Commit ddf47f0

Browse files
authored
[OSX] When HybridGlobalization mode is on load hybrid icu file (#88041)
Load icudt_hybrid.dat file when hybrid mode is on
1 parent 8a09ed7 commit ddf47f0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/tasks/AppleAppBuilder/Templates/runtime.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,11 @@
267267

268268
char icu_dat_path [1024];
269269
int res;
270-
270+
#if defined(HYBRID_GLOBALIZATION)
271+
res = snprintf (icu_dat_path, sizeof (icu_dat_path) - 1, "%s/%s", bundle, "icudt_hybrid.dat");
272+
#else
271273
res = snprintf (icu_dat_path, sizeof (icu_dat_path) - 1, "%s/%s", bundle, "icudt.dat");
274+
#endif
272275
assert (res > 0);
273276

274277
// TODO: set TRUSTED_PLATFORM_ASSEMBLIES, APP_PATHS and NATIVE_DLL_SEARCH_DIRECTORIES

src/tasks/AppleAppBuilder/Xcode.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public string GenerateCMake(
256256
bool useNativeAOTRuntime = false)
257257
{
258258
// bundle everything as resources excluding native files
259-
var predefinedExcludes = new List<string> { ".dll.o", ".dll.s", ".dwarf", ".m", ".h", ".a", ".bc", "libmonosgen-2.0.dylib", "libcoreclr.dylib", "icudt_*" };
259+
var predefinedExcludes = new List<string> { ".dll.o", ".dll.s", ".dwarf", ".m", ".h", ".a", ".bc", "libmonosgen-2.0.dylib", "libcoreclr.dylib", "icudt*" };
260260
predefinedExcludes = predefinedExcludes.Concat(excludes).ToList();
261261
if (!preferDylibs)
262262
{
@@ -268,7 +268,8 @@ public string GenerateCMake(
268268
}
269269

270270
string[] resources = Directory.GetFileSystemEntries(workspace, "", SearchOption.TopDirectoryOnly)
271-
.Where(f => !predefinedExcludes.Any(e => (!e.EndsWith('*') && f.EndsWith(e, StringComparison.InvariantCultureIgnoreCase)) || (e.EndsWith('*') && Path.GetFileName(f).StartsWith(e.TrimEnd('*'), StringComparison.InvariantCultureIgnoreCase))))
271+
.Where(f => !predefinedExcludes.Any(e => (!e.EndsWith('*') && f.EndsWith(e, StringComparison.InvariantCultureIgnoreCase)) || (e.EndsWith('*') && Path.GetFileName(f).StartsWith(e.TrimEnd('*'), StringComparison.InvariantCultureIgnoreCase) &&
272+
!(hybridGlobalization ? Path.GetFileName(f) == "icudt_hybrid.dat" : Path.GetFileName(f) == "icudt.dat"))))
272273
.ToArray();
273274

274275
if (string.IsNullOrEmpty(nativeMainSource))

0 commit comments

Comments
 (0)