Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Adds support for running mono tests on Apple M1 #47864

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
4 changes: 4 additions & 0 deletions eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ jobs:
- ${{ if eq(parameters.jobParameters.isFullMatrix, false) }}:
- OSX.1014.Amd64.Open
- OSX.1015.Amd64.Open

# OSX arm64
- ${{ if eq(parameters.platform, 'OSX_x64') }}:
- OSX.1100.ARM64.Open
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably needs to be consolidated with lines 88-91 above.


# Android
- ${{ if in(parameters.platform, 'Android_x86', 'Android_x64') }}:
Expand Down
3 changes: 3 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ jobs:
buildConfig: debug
platforms:
- OSX_x64
- OSX_arm64
- Linux_x64
- Linux_arm64
# - Linux_musl_arm64
Expand Down Expand Up @@ -567,6 +568,7 @@ jobs:
buildConfig: release
platforms:
- OSX_x64
- OSX_arm64
- Linux_arm64
jobParameters:
condition: >-
Expand Down Expand Up @@ -882,6 +884,7 @@ jobs:
platforms:
- windows_x64
- OSX_x64
- OSX_arm64
- Linux_arm64
- Linux_x64
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
Expand Down
5 changes: 4 additions & 1 deletion src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
<_MonoCXXFLAGS Condition="'$(TargetArchitecture)' == 'arm64'" Include="-arch arm64" />
<_MonoLDFLAGS Condition="'$(TargetArchitecture)' == 'arm64'" Include="-arch arm64" />
<!-- Force running as arm64 even when invoked from an x86 msbuild process -->
<_MonoBuildEnv Condition="'$(Platform)' == 'arm64'" Include="arch -arch arm64" />
<_MonoBuildEnv Condition="'$(BuildArchitecture)' == 'arm64'" Include="arch -arch arm64" />
</ItemGroup>
<!-- WASM specific options -->
<PropertyGroup Condition="'$(TargetsBrowser)' == 'true'">
Expand Down Expand Up @@ -231,6 +231,9 @@
<_MonoCMakeVersionMin Condition="'$(TargetsiOS)' == 'true'">$(iOSVersionMin)</_MonoCMakeVersionMin>
<_MonoCMakeVersionMin Condition="'$(TargetstvOS)' == 'true'">$(tvOSVersionMin)</_MonoCMakeVersionMin>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsOSX)' == 'true' and '$(Platform)' == 'arm64'">
<_MonoCMakeArgs Include="-DCMAKE_OSX_ARCHITECTURES=arm64"/>
</ItemGroup>
<ItemGroup Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
<_MonoCMakeArgs Include="-DCMAKE_SYSTEM_NAME=$(_MonoCMakeSystemName)"/>
<_MonoCMakeArgs Include="-DCMAKE_OSX_DEPLOYMENT_TARGET=$(_MonoCMakeVersionMin)" />
Expand Down
1 change: 0 additions & 1 deletion src/mono/mono/mini/tramp-arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ mono_arch_get_static_rgctx_trampoline (MonoMemoryManager *mem_manager, gpointer
{
guint8 *code, *start;
guint32 buf_len = 32;
MonoDomain *domain = mono_domain_get ();

start = code = mono_mem_manager_code_reserve (mem_manager, buf_len);

Expand Down