Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mac Catalyst (iOS API, Mac ABI) runtime #47823

Merged
merged 32 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5015d03
Initial support for Mac Catalyst for mono subset (incl SPC)
directhex Feb 1, 2021
8980f41
Get host and libs.native building. Lingering type forward issue w/ libs
directhex Feb 1, 2021
840e234
Add support for ARM64 Mac Catalyst
directhex Feb 2, 2021
901bac3
Add platform checks. Ref https://github.com/dotnet/runtime/issues/47768
directhex Feb 2, 2021
ce6ef33
Add Mac Catalyst TFM consumption where we have iOS TFM consumption
directhex Feb 2, 2021
b955a3a
Unify around maccatalyst name, fix up build a little
directhex Feb 2, 2021
ab7d99f
Partially bring up app builder.
directhex Feb 3, 2021
2ccad31
Merge remote-tracking branch 'origin/master' into catalyse
directhex Feb 3, 2021
5ee8b78
Finish brining up app builder. Next, test runner.y
directhex Feb 3, 2021
49ab49a
Fix test runner. Now only xharness itself is bad
directhex Feb 3, 2021
cbec4f2
re-enable all tests
directhex Feb 3, 2021
72e9368
Bad change, revert
directhex Feb 3, 2021
9cb3d5e
copy-paste error
directhex Feb 4, 2021
0f70185
Unify around "MacCatalyst", get rid of all uses of "Catalyst"
directhex Feb 4, 2021
5a3ab81
Add some yaml for Mac Catalyst
directhex Feb 4, 2021
2d5d1fb
Use "correct" Catalyst OS version targets - 11.0 ARM64 & 10.15.5 x64
directhex Feb 4, 2021
8daf812
Disable -Woverriding-t-option on Mac Catalyst builds
directhex Feb 4, 2021
519b266
Fix build failure
directhex Feb 4, 2021
a88df9f
Update src/libraries/System.Private.CoreLib/src/System/OperatingSyste…
directhex Feb 4, 2021
7f9099b
Merge remote-tracking branch 'origin/master' into catalyse
directhex Feb 5, 2021
ebdb15e
Fix folder detection for Catalyst test apps
directhex Feb 5, 2021
a3efc53
Merge remote-tracking branch 'directhex/catalyse' into catalyse
directhex Feb 5, 2021
59ce230
Address changes suggested by Alex
directhex Feb 5, 2021
d75869a
Fix unused variable when HAVE_SYSTEM is false
directhex Feb 5, 2021
e7cd8cc
Fix arm64 build starting. Remaining void->int error to fix due to Werror
directhex Feb 5, 2021
1192773
More fixes from Alex
directhex Feb 5, 2021
1dc4019
Disable more tests, pending API changes
directhex Feb 5, 2021
740dddb
Remove retired C define
directhex Feb 5, 2021
619e4d5
More changes from Alex
directhex Feb 5, 2021
d0c70b9
Merge remote-tracking branch 'origin/master' into catalyse
directhex Feb 8, 2021
6ac6335
Fixes from Zoltan and Steve for arm64
directhex Feb 8, 2021
1ee37bc
Build Catalyst for arm64 too
directhex Feb 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('SOLARIS'))">Solaris</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSUnixLike())">Linux</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('WINDOWS'))">windows</TargetOS>
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
directhex marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand Down Expand Up @@ -117,6 +117,7 @@
<_portableOS Condition="'$(_runtimeOSFamily)' == 'illumos'">illumos</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'Solaris'">solaris</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'Browser'">browser</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'maccatalyst'">maccatalyst</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'ios'">ios</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'tvos'">tvos</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'android'">android</_portableOS>
Expand Down Expand Up @@ -145,7 +146,7 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</_toolRuntimeRID>

<!-- There are no iOS or tvOS tools and it can be built on OSX only, so use that -->
directhex marked this conversation as resolved.
Show resolved Hide resolved
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'maccatalyst' or '$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>

<MicrosoftNetCoreIlasmPackageRuntimeId>$(_toolRuntimeRID)</MicrosoftNetCoreIlasmPackageRuntimeId>

Expand All @@ -160,6 +161,7 @@
<_outputRID Condition="'$(TargetOS)' == 'NetBSD'">netbsd-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'illumos'">illumos-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Solaris'">solaris-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'MacCatalyst'">maccatalyst-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'iOS'">ios-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'tvOS'">tvos-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Android'">android-$(TargetArchitecture)</_outputRID>
Expand All @@ -176,14 +178,15 @@
<TargetsLinux Condition="'$(TargetOS)' == 'Linux' or '$(TargetOS)' == 'Android'">true</TargetsLinux>
<TargetsNetBSD Condition="'$(TargetOS)' == 'NetBSD'">true</TargetsNetBSD>
<TargetsOSX Condition="'$(TargetOS)' == 'OSX'">true</TargetsOSX>
<TargetsMacCatalyst Condition="'$(TargetOS)' == 'MacCatalyst'">true</TargetsMacCatalyst>
<TargetsiOS Condition="'$(TargetOS)' == 'iOS'">true</TargetsiOS>
<TargetstvOS Condition="'$(TargetOS)' == 'tvOS'">true</TargetstvOS>
<TargetsiOSSimulator Condition="'$(TargetsiOS)' == 'true' and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'x86')">true</TargetsiOSSimulator>
<TargetstvOSSimulator Condition="'$(TargetstvOS)' == 'true' and '$(TargetArchitecture)' == 'x64'">true</TargetstvOSSimulator>
<TargetsAndroid Condition="'$(TargetOS)' == 'Android'">true</TargetsAndroid>
<TargetsBrowser Condition="'$(TargetOS)' == 'Browser'">true</TargetsBrowser>
<TargetsWindows Condition="'$(TargetOS)' == 'windows'">true</TargetsWindows>
<TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsAndroid)' == 'true'">true</TargetsUnix>
<TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsAndroid)' == 'true'">true</TargetsUnix>
</PropertyGroup>

<!--Feature switches -->
Expand Down
6 changes: 4 additions & 2 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ usage()
echo " --help (-h) Print help and exit."
echo " --librariesConfiguration (-lc) Libraries build configuration: Debug or Release."
echo " [Default: Debug]"
echo " --os Target operating system: windows, Linux, FreeBSD, OSX, tvOS, iOS, Android,"
echo " --os Target operating system: windows, Linux, FreeBSD, OSX, MacCatalyst, tvOS, iOS, Android,"
echo " Browser, NetBSD, illumos or Solaris."
echo " [Default: Your machine's OS.]"
echo " --projects <value> Project or solution file(s) to build."
Expand Down Expand Up @@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
directhex marked this conversation as resolved.
Show resolved Hide resolved
tvos)
os="tvOS" ;;
ios)
Expand All @@ -276,7 +278,7 @@ while [[ $# > 0 ]]; do
os="Solaris" ;;
*)
echo "Unsupported target OS '$2'."
echo "The allowed values are windows, Linux, FreeBSD, OSX, tvOS, iOS, Android, Browser, illumos and Solaris."
echo "The allowed values are windows, Linux, FreeBSD, OSX, MacCatalyst, tvOS, iOS, Android, Browser, illumos and Solaris."
exit 1
;;
esac
Expand Down
6 changes: 5 additions & 1 deletion eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ build_native()
# All set to commence the build
echo "Commencing build of \"$message\" for $__TargetOS.$__BuildArch.$__BuildType in $intermediatesDir"

if [[ "$targetOS" == OSX ]]; then
if [[ "$targetOS" == OSX || "$targetOS" == MacCatalyst ]]; then
if [[ "$platformArch" == x64 ]]; then
cmakeArgs="-DCMAKE_OSX_ARCHITECTURES=\"x86_64\" $cmakeArgs"
elif [[ "$platformArch" == arm64 ]]; then
Expand All @@ -89,6 +89,10 @@ build_native()
fi
fi

if [[ "$targetOS" == MacCatalyst ]]; then
cmakeArgs="-DCLR_CMAKE_TARGET_CATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
36 changes: 25 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -386,19 +386,33 @@ if (CLR_CMAKE_HOST_UNIX)

# Specify the minimum supported version of macOS
if(CLR_CMAKE_HOST_OSX)
if(CLR_CMAKE_HOST_ARCH_ARM64)
# 'pthread_jit_write_protect_np' is only available on macOS 11.0 or newer
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=11.0)
add_compile_options(-arch arm64)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.13)
add_compile_options(-arch x86_64)
# Mac Catalyst needs a special CFLAG, exclusive with mmacosx-version-min
if(CLR_CMAKE_TARGET_CATALYST)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios13.2-macabi)
add_link_options(-target arm64-apple-ios13.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.2-macabi)
add_link_options(-target x86_64-apple-ios13.2-macabi)
else()
clr_unknown_arch()
endif()
else()
clr_unknown_arch()
endif()
add_compile_options(${MACOS_VERSION_MIN_FLAGS})
add_linker_flag(${MACOS_VERSION_MIN_FLAGS})
if(CLR_CMAKE_HOST_ARCH_ARM64)
# 'pthread_jit_write_protect_np' is only available on macOS 11.0 or newer
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=11.0)
add_compile_options(-arch arm64)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.13)
add_compile_options(-arch x86_64)
else()
clr_unknown_arch()
endif()
add_compile_options(${MACOS_VERSION_MIN_FLAGS})
add_linker_flag(${MACOS_VERSION_MIN_FLAGS})
endif(CLR_CMAKE_TARGET_CATALYST)
endif(CLR_CMAKE_HOST_OSX)

endif(CLR_CMAKE_HOST_UNIX)

if(CLR_CMAKE_TARGET_UNIX)
Expand Down
5 changes: 5 additions & 0 deletions eng/native/configureplatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ if(CLR_CMAKE_TARGET_OS STREQUAL iOS)
set(CLR_CMAKE_TARGET_IOS 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL iOS)

if(CLR_CMAKE_TARGET_OS STREQUAL MacCatalyst)
set(CLR_CMAKE_TARGET_UNIX 1)
set(CLR_CMAKE_TARGET_CATALYST 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL MacCatalyst)

if(CLR_CMAKE_TARGET_OS STREQUAL tvOS)
set(CLR_CMAKE_TARGET_UNIX 1)
set(CLR_CMAKE_TARGET_TVOS 1)
Expand Down
2 changes: 1 addition & 1 deletion eng/native/configuretools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if(NOT WIN32 AND NOT CLR_CMAKE_TARGET_BROWSER)
locate_toolchain_exec(link CMAKE_LINKER)
endif()

if(NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND (NOT CLR_CMAKE_TARGET_ANDROID OR CROSS_ROOTFS))
if(NOT CLR_CMAKE_TARGET_OSX AND NOT CLR_CMAKE_TARGET_CATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND (NOT CLR_CMAKE_TARGET_ANDROID OR CROSS_ROOTFS))
locate_toolchain_exec(objdump CMAKE_OBJDUMP)

if(CLR_CMAKE_TARGET_ANDROID)
Expand Down
10 changes: 5 additions & 5 deletions eng/native/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function(generate_exports_file)
list(GET INPUT_LIST -1 outputFilename)
list(REMOVE_AT INPUT_LIST -1)

if(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
if(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_CATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand Down Expand Up @@ -252,7 +252,7 @@ function(strip_symbols targetName outputFilename)
if (CLR_CMAKE_HOST_UNIX)
set(strip_source_file $<TARGET_FILE:${targetName}>)

if (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
if (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_CATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(strip_destination_file ${strip_source_file}.dwarf)

# Ensure that dsymutil and strip are present
Expand Down Expand Up @@ -281,7 +281,7 @@ function(strip_symbols targetName outputFilename)
COMMAND ${strip_command}
COMMENT "Stripping symbols from ${strip_source_file} into file ${strip_destination_file}"
)
else (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
else (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_CATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(strip_destination_file ${strip_source_file}.dbg)

add_custom_command(
Expand All @@ -293,7 +293,7 @@ function(strip_symbols targetName outputFilename)
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=${strip_destination_file} ${strip_source_file}
COMMENT "Stripping symbols from ${strip_source_file} into file ${strip_destination_file}"
)
endif (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
endif (CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_CATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)

set(${outputFilename} ${strip_destination_file} PARENT_SCOPE)
else(CLR_CMAKE_HOST_UNIX)
Expand All @@ -316,7 +316,7 @@ function(install_with_stripped_symbols targetName kind destination)
install_symbols(${symbol_file} ${destination})
endif()

if ((CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS) AND ("${kind}" STREQUAL "TARGETS"))
if ((CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_CATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS) AND ("${kind}" STREQUAL "TARGETS"))
# We want to avoid the kind=TARGET install behaviors which corrupt code signatures on osx-arm64
set(kind PROGRAMS)
endif()
Expand Down
2 changes: 2 additions & 0 deletions eng/native/init-distro-rid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ initDistroRidGlobal()
distroRid="linux-$buildArch"
elif [ "$targetOs" = "OSX" ]; then
distroRid="osx-$buildArch"
elif [ "$targetOs" = "MacCatalyst" ]; then
distroRid="maccatalyst-$buildArch"
elif [ "$targetOs" = "tvOS" ]; then
distroRid="tvos-$buildArch"
elif [ "$targetOs" = "iOS" ]; then
Expand Down
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
<PackageTargetRuntime>osx</PackageTargetRuntime>
</PropertyGroup>
</When>
<When Condition="'$(TargetFrameworkSuffix)' == 'MacCatalyst'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsMacCatalyst>true</TargetsMacCatalyst>
<PackageTargetRuntime>maccatalyst</PackageTargetRuntime>
</PropertyGroup>
</When>
<When Condition="'$(TargetFrameworkSuffix)' == 'tvOS'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
Expand Down
3 changes: 3 additions & 0 deletions eng/testing/AppleRunnerTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ if [ -n "$5" ]; then
EXPECTED_EXIT_CODE="--expected-exit-code $5"
fi

if [[ "$TARGET_OS" == "MacCatalyst" ]]; then TARGET=maccatalyst; fi

if [[ "$TARGET_OS" == "iOS" && "$TARGET_ARCH" == "x86" ]]; then TARGET=ios-simulator-32; fi
if [[ "$TARGET_OS" == "iOS" && "$TARGET_ARCH" == "x64" ]]; then TARGET=ios-simulator-64; fi
if [[ "$TARGET_OS" == "iOS" && "$TARGET_ARCH" == "arm" ]]; then TARGET=ios-device; fi
Expand All @@ -29,6 +31,7 @@ if [[ "$TARGET" == "ios-simulator-"* ]]; then SCHEME_SDK=Release-iphonesimulator
if [[ "$TARGET" == "tvos-simulator" ]]; then SCHEME_SDK=Release-appletvsimulator; fi
if [[ "$TARGET" == "ios-device" ]]; then SCHEME_SDK=Release-iphoneos; fi
if [[ "$TARGET" == "tvos-device" ]]; then SCHEME_SDK=Release-appletvos; fi
if [[ "$TARGET" == "maccatalyst" ]]; then SCHEME_SDK=Release-maccatalyst; fi

cd $EXECUTION_DIR

Expand Down
12 changes: 8 additions & 4 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,21 @@
</Target>

<!-- Generate a self-contained app bundle for iOS with tests. -->
<UsingTask Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'"
<UsingTask Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'"
TaskName="AppleAppBuilderTask"
AssemblyFile="$(AppleAppBuilderTasksAssemblyPath)" />
<UsingTask TaskName="MonoAOTCompiler"
AssemblyFile="$(MonoAOTCompilerTasksAssemblyPath)" />

<Import Project="$(MonoAOTCompilerDir)MonoAOTCompiler.props" />

<Target Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'" Name="BundleTestAppleApp">
<PropertyGroup>
<DevTeamProvisioning Condition="'$(TargetOS)' == 'MacCatalyst' and '$(DevTeamProvisioning)' == ''">-</DevTeamProvisioning>
</PropertyGroup>

<Target Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'" Name="BundleTestAppleApp">
<Error Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidDir)')" Text="MicrosoftNetCoreAppRuntimePackRidDir=$(MicrosoftNetCoreAppRuntimePackRidDir) doesn't exist" />
<Error Condition="('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm') and '$(DevTeamProvisioning)' == ''"
<Error Condition="('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm' or '$(TargetOS)' == 'MacCatalyst') and '$(DevTeamProvisioning)' == ''"
Text="'DevTeamProvisioning' needs to be set for device builds. Set it to 'UBF8T346G9' if you're part of the Microsoft team account." />
<Error Condition="'$(TestArchiveTestsDir)' == ''" Text="TestArchiveTestsDir property to archive the test folder must be set." />

Expand Down Expand Up @@ -217,7 +221,7 @@
AfterTargets="ComputeResolvedFilesToPublishList">
<ItemGroup>
<_runnerFilesToPublish Include="$(AndroidTestRunnerDir)*" Condition="'$(TargetOS)' == 'Android'" />
<_runnerFilesToPublish Include="$(AppleTestRunnerDir)*" Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'" />
<_runnerFilesToPublish Include="$(AppleTestRunnerDir)*" Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'" />
<_runnerFilesToPublish Include="$(WasmTestRunnerDir)*" Condition="'$(TargetOS)' == 'Browser'" />

<ResolvedFileToPublish Include="@(_runnerFilesToPublish)" RelativePath="%(FileName)%(Extension)" CopyToPublishDirectory="PreserveNewest" PostprocessAssembly="true" />
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<RunScriptInputName Condition="'$(TargetOS)' == 'windows'">RunnerTemplate.cmd</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' != 'windows'">RunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'">AppleRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'">AppleRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'Android'">AndroidRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'Browser'">WasmRunnerTemplate.sh</RunScriptInputName>

Expand Down
2 changes: 1 addition & 1 deletion src/installer/tests/Assets/TestUtils/TestProjects.targets
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
LatestRuntimeFrameworkVersion="6.0.0-alpha.1.20602.4"
RuntimeFrameworkName="Microsoft.NETCore.App"
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;osx-arm64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;ios-arm64;ios-arm;ios-x64;ios-x86;tvos-arm64;tvos-x64;android-arm64;android-arm;android-x64;android-x86;browser-wasm"
RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;osx-arm64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;maccatalyst-x64;maccatalyst-arm64;ios-arm64;ios-arm;ios-x64;ios-x86;tvos-arm64;tvos-x64;android-arm64;android-arm;android-x64;android-x86;browser-wasm"
TargetFramework="net6.0"
TargetingPackName="Microsoft.NETCore.App.Ref"
TargetingPackVersion="6.0.0-alpha.1.20602.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public static partial class PlatformDetection
public static bool IsNetBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"));
public static bool IsiOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS"));
public static bool IstvOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS"));
public static bool IsMacCatalyst => RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"));
CoffeeFlux marked this conversation as resolved.
Show resolved Hide resolved
public static bool Isillumos => RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"));
public static bool IsSolaris => RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"));
public static bool IsBrowser => RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
Expand Down Expand Up @@ -132,7 +133,7 @@ public static bool IsNonZeroLowerBoundArraySupported
(IsOpenSslSupported &&
(OpenSslVersion.Major >= 1 && (OpenSslVersion.Minor >= 1 || OpenSslVersion.Build >= 2)));

public static bool SupportsClientAlpn => SupportsAlpn || IsOSX || IsiOS || IstvOS;
public static bool SupportsClientAlpn => SupportsAlpn || IsOSX || IsMacCatalyst || IsiOS || IstvOS;

private static Lazy<bool> s_supportsTls10 = new Lazy<bool>(GetTls10Support);
private static Lazy<bool> s_supportsTls11 = new Lazy<bool>(GetTls11Support);
Expand Down Expand Up @@ -339,7 +340,7 @@ private static bool GetTls13Support()
// The build number is approximation.
return IsWindows10Version2004Build19573OrGreater;
}
else if (IsOSX || IsiOS || IstvOS)
else if (IsOSX || IsMacCatalyst || IsiOS || IstvOS)
{
// [ActiveIssue("https://github.com/dotnet/runtime/issues/1979")]
return false;
Expand Down
Loading