@@ -3,15 +3,15 @@ class DotnetAT6 < Formula
33 homepage "https://dotnet.microsoft.com/"
44 # Source-build tag announced at https://github.com/dotnet/source-build/discussions
55 url "https://github.com/dotnet/installer.git" ,
6- tag : "v6.0.133 " ,
7- revision : "48ad8f7176f00900ff49df9fb936bc7c8c79d345 "
6+ tag : "v6.0.135 " ,
7+ revision : "9b2a203ee661f837f50486a8caedc688e05dedc4 "
88 license "MIT"
9- revision 1
109
1110 bottle do
12- sha256 cellar : :any , arm64_sonoma : "3eb824051504d2753ab5cca847f0b943bc4dc05fb403558d18fe18c5532c3845"
13- sha256 cellar : :any , sonoma : "2f19620dfb82a8bcbcec0a68175426c64ff43e3fa231cf9d05ef21e8616572b1"
14- sha256 cellar : :any_skip_relocation , x86_64_linux : "ffe54b54568dd28475dde52acdcd69cba25cd2b4a94ec568908e164477024045"
11+ sha256 cellar : :any , arm64_sequoia : "d4504f7537d39b828fd1090b071d7500b32c1159dec10ce28ab7defa25fe34ba"
12+ sha256 cellar : :any , arm64_sonoma : "6112bc7fb910dc62bb68aa2f9bdd93ce9c47d396c8949b46432b9011440e6722"
13+ sha256 cellar : :any , sonoma : "2e850d8505cdb3c220370b3cb94b724f446af5009a4429971745ae5e41788e34"
14+ sha256 cellar : :any_skip_relocation , x86_64_linux : "c656cdbcf9e10e6961b82a4ac9f6f7a96aca9e0705eed54b54676584bfc4d983"
1515 end
1616
1717 keg_only :versioned_formula
@@ -22,7 +22,7 @@ class DotnetAT6 < Formula
2222 depends_on "cmake" => :build
2323 depends_on "pkg-config" => :build
2424 depends_on "[email protected] " => :build 25- depends_on "icu4c@75 "
25+ depends_on "icu4c@76 "
2626 depends_on "openssl@3"
2727
2828 uses_from_macos "llvm" => :build
@@ -41,15 +41,13 @@ class DotnetAT6 < Formula
4141 # Apple Silicon build fails due to latest dotnet-install.sh downloading x64 dotnet-runtime.
4242 # We work around the issue by using an older working copy of dotnet-install.sh script.
4343 # Bug introduced with https://github.com/dotnet/install-scripts/pull/314
44- # TODO: Remove once script is fixed.
4544 # Issue ref: https://github.com/dotnet/install-scripts/issues/318
4645 resource "dotnet-install.sh" do
4746 url "https://raw.githubusercontent.com/dotnet/install-scripts/dac53157fcb7e02638507144bf5f8f019c1d23a8/src/dotnet-install.sh"
4847 sha256 "e96eabccea61bbbef3402e23f1889d385a6ae7ad84fe1d8f53f2507519ad86f7"
4948 end
5049
5150 # Fixes race condition in MSBuild.
52- # TODO: Remove with 6.0.3xx or later.
5351 resource "homebrew-msbuild-patch" do
5452 url "https://github.com/dotnet/msbuild/commit/64edb33a278d1334bd6efc35fecd23bd3af4ed48.patch?full_index=1"
5553 sha256 "5870bcdd12164668472094a2f9f1b73a4124e72ac99bbbe43028370be3648ccd"
@@ -63,7 +61,7 @@ class DotnetAT6 < Formula
6361 # Backport fix to build with Clang 19
6462 # Ref: https://github.com/dotnet/runtime/commit/043ae8c50dbe1c7377cf5ad436c5ac1c226aef79
6563 def clang19_patch
66- <<~EOS
64+ <<~PATCH
6765 diff --git a/src/coreclr/vm/comreflectioncache.hpp b/src/coreclr/vm/comreflectioncache.hpp
6866 index 08d173e61648c6ebb98a4d7323b30d40ec351d94..12db55251d80d24e3765a8fbe6e3b2d24a12f767 100644
6967 --- a/src/coreclr/vm/comreflectioncache.hpp
@@ -100,7 +98,89 @@ def clang19_patch
10098
10199 void UpdateHashTable(SIZE_T hash, int slot)
102100 {
103- EOS
101+ PATCH
102+ end
103+
104+ # Backport fix to build with Xcode 16 (copying unixasmmacrosarm64.inc to unixasmmacrosamd64.inc for Intel macOS)
105+ # Ref: https://github.com/dotnet/runtime/commit/562efd6824762dd0c1826cc99e006ad34a7e9e85
106+ def xcode16_patch
107+ <<~'PATCH'
108+ diff --git a/src/coreclr/pal/inc/unixasmmacrosamd64.inc b/src/coreclr/pal/inc/unixasmmacrosamd64.inc
109+ index 976cc825f2eb4..4997e18b39858 100644
110+ --- a/src/coreclr/pal/inc/unixasmmacrosamd64.inc
111+ +++ b/src/coreclr/pal/inc/unixasmmacrosamd64.inc
112+ @@ -17,7 +17,12 @@
113+ .endm
114+
115+ .macro PATCH_LABEL Name
116+ +#if defined(__APPLE__)
117+ + .alt_entry C_FUNC(\Name)
118+ + .private_extern C_FUNC(\Name)
119+ +#else
120+ .global C_FUNC(\Name)
121+ +#endif
122+ C_FUNC(\Name):
123+ .endm
124+
125+ diff --git a/src/coreclr/pal/inc/unixasmmacrosarm64.inc b/src/coreclr/pal/inc/unixasmmacrosarm64.inc
126+ index 976cc825f2eb4..4997e18b39858 100644
127+ --- a/src/coreclr/pal/inc/unixasmmacrosarm64.inc
128+ +++ b/src/coreclr/pal/inc/unixasmmacrosarm64.inc
129+ @@ -17,7 +17,12 @@
130+ .endm
131+
132+ .macro PATCH_LABEL Name
133+ +#if defined(__APPLE__)
134+ + .alt_entry C_FUNC(\Name)
135+ + .private_extern C_FUNC(\Name)
136+ +#else
137+ .global C_FUNC(\Name)
138+ +#endif
139+ C_FUNC(\Name):
140+ .endm
141+
142+ diff --git a/src/coreclr/vm/arm64/asmhelpers.S b/src/coreclr/vm/arm64/asmhelpers.S
143+ index ebfefd693f074..48c91e65a098d 100644
144+ --- a/src/coreclr/vm/arm64/asmhelpers.S
145+ +++ b/src/coreclr/vm/arm64/asmhelpers.S
146+ @@ -176,8 +176,7 @@ NESTED_END ThePreStub, _TEXT
147+
148+ LEAF_ENTRY ThePreStubPatch, _TEXT
149+ nop
150+ -.globl C_FUNC(ThePreStubPatchLabel)
151+ -C_FUNC(ThePreStubPatchLabel):
152+ +PATCH_LABEL ThePreStubPatchLabel
153+ ret lr
154+ LEAF_END ThePreStubPatch, _TEXT
155+
156+ @@ -607,8 +606,12 @@ NESTED_END ResolveWorkerAsmStub, _TEXT
157+ #ifdef FEATURE_READYTORUN
158+
159+ NESTED_ENTRY DelayLoad_MethodCall_FakeProlog, _TEXT, NoHandler
160+ -C_FUNC(DelayLoad_MethodCall):
161+ +#if defined(__APPLE__)
162+ + .alt_entry C_FUNC(DelayLoad_MethodCall)
163+ +#endif
164+ .global C_FUNC(DelayLoad_MethodCall)
165+ +C_FUNC(DelayLoad_MethodCall):
166+ +
167+ PROLOG_WITH_TRANSITION_BLOCK
168+
169+ add x0, sp, #__PWTB_TransitionBlock // pTransitionBlock
170+ @@ -627,8 +630,11 @@ NESTED_END DelayLoad_MethodCall_FakeProlog, _TEXT
171+
172+ .macro DynamicHelper frameFlags, suffix
173+ NESTED_ENTRY DelayLoad_Helper\suffix\()_FakeProlog, _TEXT, NoHandler
174+ -C_FUNC(DelayLoad_Helper\suffix):
175+ +#if defined(__APPLE__)
176+ + .alt_entry C_FUNC(DelayLoad_Helper\suffix)
177+ +#endif
178+ .global C_FUNC(DelayLoad_Helper\suffix)
179+ +C_FUNC(DelayLoad_Helper\suffix):
180+
181+ PROLOG_WITH_TRANSITION_BLOCK
182+
183+ PATCH
104184 end
105185
106186 def install
@@ -114,6 +194,7 @@ def install
114194 ( buildpath /".dotnet" ) . install resource ( "dotnet-install.sh" )
115195 ( buildpath /"src/SourceBuild/tarball/patches/msbuild" ) . install resource ( "homebrew-msbuild-patch" )
116196 ( buildpath /"src/SourceBuild/tarball/patches/runtime/clang19.patch" ) . write clang19_patch
197+ ( buildpath /"src/SourceBuild/tarball/patches/runtime/xcode16.patch" ) . write xcode16_patch if OS . mac?
117198
118199 # The source directory needs to be outside the installer directory
119200 ( buildpath /"installer" ) . install buildpath . children
@@ -128,26 +209,22 @@ def install
128209 "\\ 0 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=ON"
129210
130211 # Fix Clang 15 error: definition of builtin function '__cpuid'.
131- # Remove if following fix is backported to .NET 6.0.1xx
132212 # Ref: https://github.com/dotnet/runtime/commit/992cf8c97cc71d4ca9a0a11e6604a6716ed4cefc
133213 inreplace "src/runtime/src/coreclr/vm/amd64/unixstubs.cpp" ,
134214 /^ *void (__cpuid|__cpuidex)\( [^}]*}$/ ,
135215 "#if !__has_builtin(\\ 1)\n \\ 0\n #endif"
136216
137217 # Fix missing macOS conditional for system unwind searching.
138- # Remove if following fix is backported to .NET 6.0.1xx
139218 # Ref: https://github.com/dotnet/runtime/commit/97c9a11e3e6ca68adf0c60155fa82ab3aae953a5
140219 inreplace "src/runtime/src/native/corehost/apphost/static/CMakeLists.txt" ,
141220 "if(CLR_CMAKE_USE_SYSTEM_LIBUNWIND)" ,
142221 "if(CLR_CMAKE_USE_SYSTEM_LIBUNWIND AND NOT CLR_CMAKE_TARGET_OSX)"
143222
144223 # Work around arcade build failure with BSD `sed` due to non-compatible `-i`.
145- # Remove if following fix is backported to .NET 6.0.1xx
146224 # Ref: https://github.com/dotnet/arcade/commit/b8007eed82adabd50c604a9849277a6e7be5c971
147225 inreplace "src/arcade/eng/SourceBuild.props" , "\" sed -i " , "\" sed -i.bak " if OS . mac?
148226
149227 # Rename patch fails on case-insensitive systems like macOS
150- # TODO: Remove whenever patch is no longer used
151228 rename_patch = "0001-Rename-NuGet.Config-to-NuGet.config-to-account-for-a.patch"
152229 ( Pathname ( "src/nuget-client/eng/source-build-patches" ) /rename_patch ) . unlink if OS . mac?
153230
@@ -169,15 +246,15 @@ def install
169246 end
170247
171248 def caveats
172- <<~EOS
249+ <<~TEXT
173250 For other software to find dotnet you may need to set:
174251 export DOTNET_ROOT="#{ opt_libexec } "
175- EOS
252+ TEXT
176253 end
177254
178255 test do
179256 target_framework = "net#{ version . major_minor } "
180- ( testpath /"test.cs" ) . write <<~EOS
257+ ( testpath /"test.cs" ) . write <<~CSHARP
181258 using System;
182259
183260 namespace Homebrew
@@ -191,8 +268,9 @@ def caveats
191268 }
192269 }
193270 }
194- EOS
195- ( testpath /"test.csproj" ) . write <<~EOS
271+ CSHARP
272+
273+ ( testpath /"test.csproj" ) . write <<~XML
196274 <Project Sdk="Microsoft.NET.Sdk">
197275 <PropertyGroup>
198276 <OutputType>Exe</OutputType>
@@ -208,7 +286,8 @@ def caveats
208286 <Compile Include="test.cs" />
209287 </ItemGroup>
210288 </Project>
211- EOS
289+ XML
290+
212291 system bin /"dotnet" , "build" , "--framework" , target_framework , "--output" , testpath , testpath /"test.csproj"
213292 assert_equal "#{ testpath } /test.dll,a,b,c\n " ,
214293 shell_output ( "#{ bin } /dotnet run --framework #{ target_framework } #{ testpath } /test.dll a b c" )
0 commit comments