From 4d7a49819b7607d676ca2f50f853af61338340a7 Mon Sep 17 00:00:00 2001 From: Matous Kozak Date: Thu, 14 Mar 2024 14:09:56 +0100 Subject: [PATCH] fix System.Globalization.IOS.Tests --- src/tasks/AppleAppBuilder/Xcode.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/tasks/AppleAppBuilder/Xcode.cs b/src/tasks/AppleAppBuilder/Xcode.cs index 0e05d9168423e0..f253b41a2b188e 100644 --- a/src/tasks/AppleAppBuilder/Xcode.cs +++ b/src/tasks/AppleAppBuilder/Xcode.cs @@ -396,9 +396,14 @@ public string GenerateCMake( } else if (forceAOT || !(preferDylibs && dylibExists)) { - // these libraries are pinvoked - // -force_load will be removed once we enable direct-pinvokes for AOT - toLink += $" \"-force_load {lib}\"{Environment.NewLine}"; + // do not export symbols from ICU libraries + if (libName == "libicui18n" || libName == "libicudata" || libName == "libicuuc") { + toLink += $" \"-load_hidden {lib}\"{Environment.NewLine}"; + } else { + // these libraries are pinvoked + // -force_load will be removed once we enable direct-pinvokes for AOT + toLink += $" \"-force_load {lib}\"{Environment.NewLine}"; + } } }