Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line numberDiff line numberDiff 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)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand DownExpand 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 DownExpand Up@@ -144,8 +145,8 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_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 -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<!-- There are no Mac Catalyst, iOS or tvOS tools and it can be built on OSX only, so use that -->
<_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 numberDiff line numberDiff 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 DownExpand Up@@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
Comment thread
directhex marked this conversation as 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 numberDiff line numberDiff 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_MACCATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
43 changes: 32 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line numberDiff line numberDiff line change
Expand Up@@ -390,19 +390,40 @@ 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_MACCATALYST)
# Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass
Comment thread
directhex marked this conversation as resolved.
# a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
add_link_options(-target x86_64-apple-ios13.5-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_MACCATALYST)
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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand DownExpand 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_MACCATALYST 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 DownExpand 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_MACCATALYST 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_MACCATALYST 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_MACCATALYST 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 numberDiff line numberDiff 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
42 changes: 42 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -323,6 +323,48 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst x64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: x64
targetRid: maccatalyst-x64
platform: MacCatalyst_x64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst arm64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_arm64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: arm64
targetRid: maccatalyst-arm64
platform: MacCatalyst_arm64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# tvOS x64

- ${{ if containsValue(parameters.platforms, 'tvOS_x64') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,7 +119,7 @@ jobs:
queue: BuildPool.Ubuntu.1604.Amd64

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.15'

# Official Build Windows Pool
Expand All@@ -135,7 +135,7 @@ jobs:

${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'iOS', 'tvOS')) }}:
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,8 @@ stages:
- Android_x86
- Android_arm
- Android_arm64
- MacCatalyst_x64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add MacCatalyst_arm64 ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's blocking on arm64 LLVM packages

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on a different issue, #47891

- MacCatalyst_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/runtime.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,6 +212,8 @@ jobs:
runtimeFlavor: mono
platforms:
- Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOS_x64
- iOS_arm64
- iOS_x86
Expand DownExpand Up@@ -1050,4 +1052,4 @@ jobs:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))
eq(variables['isFullMatrix'], true))
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line numberDiff line numberDiff 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)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand DownExpand 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 DownExpand Up@@ -144,8 +145,8 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_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 -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<!-- There are no Mac Catalyst, iOS or tvOS tools and it can be built on OSX only, so use that -->
<_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 numberDiff line numberDiff 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 DownExpand Up@@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
Comment thread
directhex marked this conversation as 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 numberDiff line numberDiff 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_MACCATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
43 changes: 32 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line numberDiff line numberDiff line change
Expand Up@@ -390,19 +390,40 @@ 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_MACCATALYST)
# Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass
Comment thread
directhex marked this conversation as resolved.
# a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
add_link_options(-target x86_64-apple-ios13.5-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_MACCATALYST)
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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand DownExpand 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_MACCATALYST 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 DownExpand 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_MACCATALYST 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_MACCATALYST 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_MACCATALYST 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 numberDiff line numberDiff 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
42 changes: 42 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -323,6 +323,48 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst x64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: x64
targetRid: maccatalyst-x64
platform: MacCatalyst_x64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst arm64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_arm64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: arm64
targetRid: maccatalyst-arm64
platform: MacCatalyst_arm64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# tvOS x64

- ${{ if containsValue(parameters.platforms, 'tvOS_x64') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,7 +119,7 @@ jobs:
queue: BuildPool.Ubuntu.1604.Amd64

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.15'

# Official Build Windows Pool
Expand All@@ -135,7 +135,7 @@ jobs:

${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'iOS', 'tvOS')) }}:
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,8 @@ stages:
- Android_x86
- Android_arm
- Android_arm64
- MacCatalyst_x64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add MacCatalyst_arm64 ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's blocking on arm64 LLVM packages

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on a different issue, #47891

- MacCatalyst_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/runtime.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,6 +212,8 @@ jobs:
runtimeFlavor: mono
platforms:
- Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOS_x64
- iOS_arm64
- iOS_x86
Expand DownExpand Up@@ -1050,4 +1052,4 @@ jobs:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))
eq(variables['isFullMatrix'], true))
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line numberDiff line numberDiff 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)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand DownExpand 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 DownExpand Up@@ -144,8 +145,8 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_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 -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<!-- There are no Mac Catalyst, iOS or tvOS tools and it can be built on OSX only, so use that -->
<_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 numberDiff line numberDiff 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 DownExpand Up@@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
Comment thread
directhex marked this conversation as 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 numberDiff line numberDiff 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_MACCATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
43 changes: 32 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line numberDiff line numberDiff line change
Expand Up@@ -390,19 +390,40 @@ 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_MACCATALYST)
# Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass
Comment thread
directhex marked this conversation as resolved.
# a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
add_link_options(-target x86_64-apple-ios13.5-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_MACCATALYST)
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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand DownExpand 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_MACCATALYST 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 DownExpand 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_MACCATALYST 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_MACCATALYST 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_MACCATALYST 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 numberDiff line numberDiff 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
42 changes: 42 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -323,6 +323,48 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst x64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: x64
targetRid: maccatalyst-x64
platform: MacCatalyst_x64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst arm64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_arm64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: arm64
targetRid: maccatalyst-arm64
platform: MacCatalyst_arm64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# tvOS x64

- ${{ if containsValue(parameters.platforms, 'tvOS_x64') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,7 +119,7 @@ jobs:
queue: BuildPool.Ubuntu.1604.Amd64

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.15'

# Official Build Windows Pool
Expand All@@ -135,7 +135,7 @@ jobs:

${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'iOS', 'tvOS')) }}:
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,8 @@ stages:
- Android_x86
- Android_arm
- Android_arm64
- MacCatalyst_x64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add MacCatalyst_arm64 ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's blocking on arm64 LLVM packages

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on a different issue, #47891

- MacCatalyst_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/runtime.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,6 +212,8 @@ jobs:
runtimeFlavor: mono
platforms:
- Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOS_x64
- iOS_arm64
- iOS_x86
Expand DownExpand Up@@ -1050,4 +1052,4 @@ jobs:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))
eq(variables['isFullMatrix'], true))
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line numberDiff line numberDiff 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)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand DownExpand 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 DownExpand Up@@ -144,8 +145,8 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_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 -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<!-- There are no Mac Catalyst, iOS or tvOS tools and it can be built on OSX only, so use that -->
<_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 numberDiff line numberDiff 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 DownExpand Up@@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
Comment thread
directhex marked this conversation as 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 numberDiff line numberDiff 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_MACCATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
43 changes: 32 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line numberDiff line numberDiff line change
Expand Up@@ -390,19 +390,40 @@ 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_MACCATALYST)
# Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass
Comment thread
directhex marked this conversation as resolved.
# a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
add_link_options(-target x86_64-apple-ios13.5-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_MACCATALYST)
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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand DownExpand 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_MACCATALYST 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 DownExpand 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_MACCATALYST 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_MACCATALYST 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_MACCATALYST 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 numberDiff line numberDiff 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
42 changes: 42 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -323,6 +323,48 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst x64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: x64
targetRid: maccatalyst-x64
platform: MacCatalyst_x64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst arm64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_arm64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: arm64
targetRid: maccatalyst-arm64
platform: MacCatalyst_arm64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# tvOS x64

- ${{ if containsValue(parameters.platforms, 'tvOS_x64') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,7 +119,7 @@ jobs:
queue: BuildPool.Ubuntu.1604.Amd64

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.15'

# Official Build Windows Pool
Expand All@@ -135,7 +135,7 @@ jobs:

${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'iOS', 'tvOS')) }}:
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,8 @@ stages:
- Android_x86
- Android_arm
- Android_arm64
- MacCatalyst_x64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add MacCatalyst_arm64 ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's blocking on arm64 LLVM packages

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on a different issue, #47891

- MacCatalyst_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/runtime.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,6 +212,8 @@ jobs:
runtimeFlavor: mono
platforms:
- Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOS_x64
- iOS_arm64
- iOS_x86
Expand DownExpand Up@@ -1050,4 +1052,4 @@ jobs:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))
eq(variables['isFullMatrix'], true))
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line numberDiff line numberDiff 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)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand DownExpand 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 DownExpand Up@@ -144,8 +145,8 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_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 -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<!-- There are no Mac Catalyst, iOS or tvOS tools and it can be built on OSX only, so use that -->
<_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 numberDiff line numberDiff 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 DownExpand Up@@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
Comment thread
directhex marked this conversation as 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 numberDiff line numberDiff 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_MACCATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
43 changes: 32 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line numberDiff line numberDiff line change
Expand Up@@ -390,19 +390,40 @@ 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_MACCATALYST)
# Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass
Comment thread
directhex marked this conversation as resolved.
# a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
add_link_options(-target x86_64-apple-ios13.5-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_MACCATALYST)
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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand DownExpand 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_MACCATALYST 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 DownExpand 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_MACCATALYST 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_MACCATALYST 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_MACCATALYST 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 numberDiff line numberDiff 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
42 changes: 42 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -323,6 +323,48 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst x64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: x64
targetRid: maccatalyst-x64
platform: MacCatalyst_x64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst arm64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_arm64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: arm64
targetRid: maccatalyst-arm64
platform: MacCatalyst_arm64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# tvOS x64

- ${{ if containsValue(parameters.platforms, 'tvOS_x64') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,7 +119,7 @@ jobs:
queue: BuildPool.Ubuntu.1604.Amd64

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.15'

# Official Build Windows Pool
Expand All@@ -135,7 +135,7 @@ jobs:

${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'iOS', 'tvOS')) }}:
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,8 @@ stages:
- Android_x86
- Android_arm
- Android_arm64
- MacCatalyst_x64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add MacCatalyst_arm64 ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's blocking on arm64 LLVM packages

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on a different issue, #47891

- MacCatalyst_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/runtime.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,6 +212,8 @@ jobs:
runtimeFlavor: mono
platforms:
- Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOS_x64
- iOS_arm64
- iOS_x86
Expand DownExpand Up@@ -1050,4 +1052,4 @@ jobs:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))
eq(variables['isFullMatrix'], true))
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line numberDiff line numberDiff 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)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand DownExpand 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 DownExpand Up@@ -144,8 +145,8 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_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 -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<!-- There are no Mac Catalyst, iOS or tvOS tools and it can be built on OSX only, so use that -->
<_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 numberDiff line numberDiff 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 DownExpand Up@@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
Comment thread
directhex marked this conversation as 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 numberDiff line numberDiff 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_MACCATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
43 changes: 32 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line numberDiff line numberDiff line change
Expand Up@@ -390,19 +390,40 @@ 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_MACCATALYST)
# Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass
Comment thread
directhex marked this conversation as resolved.
# a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
add_link_options(-target x86_64-apple-ios13.5-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_MACCATALYST)
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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand DownExpand 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_MACCATALYST 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 DownExpand 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_MACCATALYST 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_MACCATALYST 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_MACCATALYST 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 numberDiff line numberDiff 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
42 changes: 42 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -323,6 +323,48 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst x64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: x64
targetRid: maccatalyst-x64
platform: MacCatalyst_x64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst arm64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_arm64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: arm64
targetRid: maccatalyst-arm64
platform: MacCatalyst_arm64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# tvOS x64

- ${{ if containsValue(parameters.platforms, 'tvOS_x64') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,7 +119,7 @@ jobs:
queue: BuildPool.Ubuntu.1604.Amd64

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.15'

# Official Build Windows Pool
Expand All@@ -135,7 +135,7 @@ jobs:

${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'iOS', 'tvOS')) }}:
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,8 @@ stages:
- Android_x86
- Android_arm
- Android_arm64
- MacCatalyst_x64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add MacCatalyst_arm64 ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's blocking on arm64 LLVM packages

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on a different issue, #47891

- MacCatalyst_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/runtime.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,6 +212,8 @@ jobs:
runtimeFlavor: mono
platforms:
- Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOS_x64
- iOS_arm64
- iOS_x86
Expand DownExpand Up@@ -1050,4 +1052,4 @@ jobs:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))
eq(variables['isFullMatrix'], true))
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line numberDiff line numberDiff 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)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand DownExpand 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 DownExpand Up@@ -144,8 +145,8 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_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 -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<!-- There are no Mac Catalyst, iOS or tvOS tools and it can be built on OSX only, so use that -->
<_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 numberDiff line numberDiff 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 DownExpand Up@@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
Comment thread
directhex marked this conversation as 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 numberDiff line numberDiff 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_MACCATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
43 changes: 32 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line numberDiff line numberDiff line change
Expand Up@@ -390,19 +390,40 @@ 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_MACCATALYST)
# Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass
Comment thread
directhex marked this conversation as resolved.
# a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
add_link_options(-target x86_64-apple-ios13.5-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_MACCATALYST)
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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand DownExpand 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_MACCATALYST 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 DownExpand 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_MACCATALYST 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_MACCATALYST 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_MACCATALYST 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 numberDiff line numberDiff 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
42 changes: 42 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -323,6 +323,48 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst x64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: x64
targetRid: maccatalyst-x64
platform: MacCatalyst_x64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst arm64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_arm64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: arm64
targetRid: maccatalyst-arm64
platform: MacCatalyst_arm64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# tvOS x64

- ${{ if containsValue(parameters.platforms, 'tvOS_x64') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,7 +119,7 @@ jobs:
queue: BuildPool.Ubuntu.1604.Amd64

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.15'

# Official Build Windows Pool
Expand All@@ -135,7 +135,7 @@ jobs:

${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'iOS', 'tvOS')) }}:
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,8 @@ stages:
- Android_x86
- Android_arm
- Android_arm64
- MacCatalyst_x64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add MacCatalyst_arm64 ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's blocking on arm64 LLVM packages

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on a different issue, #47891

- MacCatalyst_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/runtime.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,6 +212,8 @@ jobs:
runtimeFlavor: mono
platforms:
- Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOS_x64
- iOS_arm64
- iOS_x86
Expand DownExpand Up@@ -1050,4 +1052,4 @@ jobs:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))
eq(variables['isFullMatrix'], true))
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 7 additions & 4 deletions Directory.Build.props
Original file line numberDiff line numberDiff 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)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand DownExpand 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 DownExpand Up@@ -144,8 +145,8 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_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 -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
<!-- There are no Mac Catalyst, iOS or tvOS tools and it can be built on OSX only, so use that -->
<_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 numberDiff line numberDiff 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 DownExpand Up@@ -262,6 +262,8 @@ while [[ $# > 0 ]]; do
os="FreeBSD" ;;
osx)
os="OSX" ;;
maccatalyst)
os="MacCatalyst" ;;
Comment thread
directhex marked this conversation as 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 numberDiff line numberDiff 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_MACCATALYST=1 $cmakeArgs"
fi

if [[ "$__UseNinja" == 1 ]]; then
generator="ninja"
buildTool="$(command -v ninja || command -v ninja-build)"
Expand Down
43 changes: 32 additions & 11 deletions eng/native/configurecompiler.cmake
Original file line numberDiff line numberDiff line change
Expand Up@@ -390,19 +390,40 @@ 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_MACCATALYST)
# Somewhere between CMake 3.17 and 3.19.4, it became impossible to not pass
Comment thread
directhex marked this conversation as resolved.
# a value for mmacosx-version-min (blank CMAKE_OSX_DEPLOYMENT_TARGET gets
# replaced with a default value, and always gets expanded to an OS version.
# https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# We need to disable the warning that -tagret replaces -mmacosx-version-min
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
add_compile_options(-target arm64-apple-ios14.2-macabi)
add_link_options(-target arm64-apple-ios14.2-macabi)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
add_compile_options(-target x86_64-apple-ios13.5-macabi)
add_link_options(-target x86_64-apple-ios13.5-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_MACCATALYST)
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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST 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 numberDiff line numberDiff 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_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
set(SCRIPT_NAME generateexportedsymbols.sh)
else()
set(SCRIPT_NAME generateversionscript.sh)
Expand DownExpand 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_MACCATALYST 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 DownExpand 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_MACCATALYST 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_MACCATALYST 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_MACCATALYST 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 numberDiff line numberDiff 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
42 changes: 42 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -323,6 +323,48 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst x64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: x64
targetRid: maccatalyst-x64
platform: MacCatalyst_x64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# Mac Catalyst arm64

- ${{ if containsValue(parameters.platforms, 'MacCatalyst_arm64') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: MacCatalyst
archType: arm64
targetRid: maccatalyst-arm64
platform: MacCatalyst_arm64
jobParameters:
runtimeFlavor: mono
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# tvOS x64

- ${{ if containsValue(parameters.platforms, 'tvOS_x64') }}:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/xplat-setup.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -119,7 +119,7 @@ jobs:
queue: BuildPool.Ubuntu.1604.Amd64

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
${{ if in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.15'

# Official Build Windows Pool
Expand All@@ -135,7 +135,7 @@ jobs:

${{ if eq(parameters.helixQueuesTemplate, '') }}:
# macOS hosted pool machines are slower so we need to give a greater timeout than the 60 mins default.
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'iOS', 'tvOS')) }}:
${{ if and(eq(parameters.jobParameters.timeoutInMinutes, ''), in(parameters.osGroup, 'OSX', 'MacCatalyst', 'iOS', 'tvOS')) }}:
timeoutInMinutes: 120
${{ insert }}: ${{ parameters.jobParameters }}
${{ if ne(parameters.helixQueuesTemplate, '') }}:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,8 @@ stages:
- Android_x86
- Android_arm
- Android_arm64
- MacCatalyst_x64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add MacCatalyst_arm64 ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's blocking on arm64 LLVM packages

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on a different issue, #47891

- MacCatalyst_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/runtime.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,6 +212,8 @@ jobs:
runtimeFlavor: mono
platforms:
- Android_x86
- MacCatalyst_x64
- MacCatalyst_arm64
- tvOS_x64
- iOS_arm64
- iOS_x86
Expand DownExpand Up@@ -1050,4 +1052,4 @@ jobs:
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))
eq(variables['isFullMatrix'], true))
7 changes: 7 additions & 0 deletions eng/targetframeworksuffix.props
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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
Loading