Skip to content

Commit f8c704b

Browse files
committed
Fix after rebase
1 parent d7aa597 commit f8c704b

File tree

8 files changed

+21
-11
lines changed

8 files changed

+21
-11
lines changed

docs/workflow/building/coreclr/ios.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Build requirements are the same as for building native CoreCLR on macOS. iPhone
99
Build the runtime pack and tools with
1010

1111
```
12-
./build.sh clr+clr.nativeaotlibs+libs+packs -os [iossimulator/tvossimulator/maccatalyst] -arch [x64/arm64] -cross
12+
./build.sh clr+clr.runtime+libs+packs -os [iossimulator/tvossimulator/maccatalyst] -arch [x64/arm64] -cross -c Release
1313
```
1414

1515
## Running the sample iOS app

eng/Subsets.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
</PropertyGroup>
5656

5757
<PropertyGroup>
58-
<RuntimeFlavor Condition="'$(TargetsMobile)' == 'true' and !$(_subset.Contains('+clr.nativeaotlibs+'))">Mono</RuntimeFlavor>
59-
<RuntimeFlavor Condition="('$(TargetsMobile)' == 'true' or '$(TargetsLinuxBionic)' == 'true') and $(_subset.Contains('+clr.nativeaotlibs+'))">CoreCLR</RuntimeFlavor>
58+
<RuntimeFlavor Condition="('$(TargetsMobile)' == 'true' or '$(TargetsLinuxBionic)' == 'true') and ($(_subset.Contains('+clr.nativeaotlibs+')) or $(_subset.Contains('+clr.runtime+')))">CoreCLR</RuntimeFlavor>
59+
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and '$(TargetsMobile)' == 'true'">Mono</RuntimeFlavor>
6060
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime+'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime+')))">Mono</RuntimeFlavor>
6161
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">$(PrimaryRuntimeFlavor)</RuntimeFlavor>
6262
</PropertyGroup>
@@ -65,7 +65,7 @@
6565
<DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host.native</DefaultCoreClrSubsets>
6666
<DefaultCoreClrSubsets Condition="'$(PackageRID)' == 'linux-armel'">clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools</DefaultCoreClrSubsets>
6767
<!-- Even on platforms that do not support the CoreCLR runtime, we still want to build ilasm/ildasm. -->
68-
<DefaultCoreClrSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'CoreCLR'">clr.iltools+clr.packages</DefaultCoreClrSubsets>
68+
<DefaultCoreClrSubsets Condition="'$(RuntimeFlavor)' != 'CoreCLR'">clr.iltools+clr.packages</DefaultCoreClrSubsets>
6969

7070
<DefaultNativeAotSubsets>clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime</DefaultNativeAotSubsets>
7171

src/coreclr/.nuget/ILCompiler.Reflection.ReadyToRun.Experimental/ILCompiler.Reflection.ReadyToRun.Experimental.pkgproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageFile Include="$(RuntimeBinDir)R2RDump\ILCompiler.Reflection.ReadyToRun.dll">
14+
<PackageFile Include="$(RuntimeBinDir)ILCompiler.Reflection.ReadyToRun.dll">
1515
<TargetPath>\lib\netstandard2.0\</TargetPath>
1616
</PackageFile>
1717
<Dependency Include="System.Reflection.Metadata">

src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ endif(CLR_CMAKE_TARGET_WIN32)
221221

222222
# add the install targets
223223
install_clr(TARGETS coreclr DESTINATIONS . sharedFramework COMPONENT runtime)
224+
if(CLR_CMAKE_HOST_MACCATALYST OR CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS)
225+
install_clr(TARGETS coreclr_static DESTINATIONS . sharedFramework COMPONENT runtime)
226+
endif()
224227

225228
# Enable profile guided optimization
226229
add_pgo(coreclr)

src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
<PlatformManifestFileEntry Include="coreclr.dll" IsNative="true" />
105105
<PlatformManifestFileEntry Include="libcoreclr.so" IsNative="true" />
106106
<PlatformManifestFileEntry Include="libcoreclr.dylib" IsNative="true" />
107+
<PlatformManifestFileEntry Include="libcoreclr_static.a" IsNative="true" />
107108
<PlatformManifestFileEntry Include="clrgc.dll" IsNative="true" />
108109
<PlatformManifestFileEntry Include="libclrgc.so" IsNative="true" />
109110
<PlatformManifestFileEntry Include="libclrgc.dylib" IsNative="true" />

src/mono/msbuild/apple/build/AppleBuild.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<_AotCompileTargetName Condition="'$(UseNativeAOTRuntime)' == 'true'">_AppleNativeAotCompile</_AotCompileTargetName>
2525
<_AotCompileTargetName Condition="'$(UseNativeAOTRuntime)' != 'true'">_AppleAotCompile</_AotCompileTargetName>
2626
<IlcCompileDependsOn>ComputeIlcCompileInputs;SetupOSSpecificProps;PrepareForILLink</IlcCompileDependsOn>
27-
<_ReadRuntimeComponentsManifestTargetName Condition="'$(UseNativeAOTRuntime)' != 'true'">_MonoReadAvailableComponentsManifest</_ReadRuntimeComponentsManifestTargetName>
27+
<_ReadRuntimeComponentsManifestTargetName Condition="'$(UseNativeAOTRuntime)' != 'true' and '$(UseMonoRuntime)' != 'false'">_MonoReadAvailableComponentsManifest</_ReadRuntimeComponentsManifestTargetName>
2828

2929
<AppleBuildAfterThisTarget Condition="'$(AppleBuildAfterThisTarget)' == ''">Publish</AppleBuildAfterThisTarget>
3030
<AppleBuildDependsOn>
@@ -44,6 +44,6 @@
4444
<_CommonTargetsDir Condition="'$(_CommonTargetsDir)' == ''">$([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory), '..', '..', 'common'))</_CommonTargetsDir>
4545
</PropertyGroup>
4646

47-
<Import Condition="'$(UseNativeAOTRuntime)' != 'true'" Project="$(_CommonTargetsDir)CommonMobileBuild.props" />
48-
<Import Condition="'$(UseNativeAOTRuntime)' != 'true'" Project="$(_CommonTargetsDir)RuntimeComponentManifest.targets" />
47+
<Import Condition="'$(UseNativeAOTRuntime)' != 'true' and '$(UseMonoRuntime)' != 'false'" Project="$(_CommonTargetsDir)CommonMobileBuild.props" />
48+
<Import Condition="'$(UseNativeAOTRuntime)' != 'true' and '$(UseMonoRuntime)' != 'false'" Project="$(_CommonTargetsDir)RuntimeComponentManifest.targets" />
4949
</Project>

src/native/libs/System.Globalization.Native/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ add_library(System.Globalization.Native-Static
188188
entrypoints.c
189189
)
190190

191+
if (DEFINED CMAKE_ICU_DIR)
192+
include_directories(${CMAKE_ICU_DIR}/include)
193+
target_link_libraries(System.Globalization.Native-Static ${CMAKE_ICU_DIR}/lib/libicuuc.a ${CMAKE_ICU_DIR}/lib/libicui18n.a ${CMAKE_ICU_DIR}/lib/libicudata.a)
194+
target_link_libraries(System.Globalization.Native-Static stdc++)
195+
endif()
196+
191197
if(CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_WASI)
192198
set_target_properties(System.Globalization.Native-Static PROPERTIES OUTPUT_NAME System.Globalization.Native CLEAN_DIRECT_OUTPUT 1)
193199
endif()

src/tasks/AppleAppBuilder/Xcode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public string GenerateCMake(
270270
var predefinedExcludes = new List<string> { ".dll.o", ".dll.s", ".dwarf", ".m", ".h", ".a", ".bc", "libmonosgen-2.0.dylib", "icudt*" };
271271

272272
// TODO: All of these exclusions shouldn't be needed once we carefully construct the publish folder on Helix
273-
if (runtime == "NativeAOT")
273+
if (targetRuntime == TargetRuntime.NativeAOT)
274274
{
275275
predefinedExcludes.Add(".dll");
276276
predefinedExcludes.Add(".pdb");
@@ -361,7 +361,7 @@ public string GenerateCMake(
361361
// Current differences:
362362
// - NativeAOT produces {ProjectName}.dylib, while MonoAOT produces lib{ProjectName}.dylib
363363
// - NativeAOT places the library in the 'workspace' location ie 'publish' folder, while MonoAOT places it in 'binDir' ie 'AppBundle'
364-
if (useNativeAOTRuntime)
364+
if (targetRuntime == TargetRuntime.NativeAOT)
365365
{
366366
libraryPath = Path.Combine(workspace, $"{projectName}.dylib");
367367
}
@@ -378,7 +378,7 @@ public string GenerateCMake(
378378
cmakeLists = cmakeLists.Replace("%DYLIB_PATH%", libraryPath);
379379

380380
// pass the shared library to the linker for dynamic linking
381-
if (useNativeAOTRuntime)
381+
if (targetRuntime == TargetRuntime.NativeAOT)
382382
toLink += $" {libraryPath}{Environment.NewLine}";
383383
}
384384
else

0 commit comments

Comments
 (0)