@@ -28,7 +28,7 @@ Rake::ExtensionTask.new('grpc_c', spec) do |ext|
28
28
ext . lib_dir = File . join ( 'src' , 'ruby' , 'lib' , 'grpc' )
29
29
ext . cross_compile = true
30
30
ext . cross_platform = [
31
- 'x86-mingw32' , 'x64-mingw32' ,
31
+ 'x86-mingw32' , 'x64-mingw32' , 'x64-mingw-ucrt' ,
32
32
'x86_64-linux' , 'x86-linux' ,
33
33
'x86_64-darwin' , 'arm64-darwin' ,
34
34
'universal-darwin'
@@ -38,7 +38,7 @@ Rake::ExtensionTask.new('grpc_c', spec) do |ext|
38
38
|file | file . start_with? (
39
39
"src/ruby/bin/" , "src/ruby/ext/" , "src/ruby/lib/" , "src/ruby/pb/" )
40
40
}
41
- spec . files += %w( etc/roots.pem grpc_c.32.ruby grpc_c.64.ruby )
41
+ spec . files += %w( etc/roots.pem grpc_c.32.ruby grpc_c.64.ruby grpc_c.64-ucrt.ruby )
42
42
end
43
43
end
44
44
@@ -87,9 +87,10 @@ task 'dlls', [:plat] do |t, args|
87
87
plat_list = args [ :plat ]
88
88
89
89
build_configs = [ ]
90
+ w64_ucrt = { cross : 'x86_64-w64-mingw32' , out : 'grpc_c.64-ucrt.ruby' , platform : 'x64-mingw-ucrt' }
90
91
w64 = { cross : 'x86_64-w64-mingw32' , out : 'grpc_c.64.ruby' , platform : 'x64-mingw32' }
91
92
w32 = { cross : 'i686-w64-mingw32' , out : 'grpc_c.32.ruby' , platform : 'x86-mingw32' }
92
- [ w64 , w32 ] . each do |config |
93
+ [ w64_ucrt , w64 , w32 ] . each do |config |
93
94
if plat_list . include? ( config [ :platform ] )
94
95
# build the DLL (as grpc_c.*.ruby)
95
96
build_configs . append ( config )
@@ -151,6 +152,7 @@ task 'gem:native', [:plat] do |t, args|
151
152
152
153
FileUtils . touch 'grpc_c.32.ruby'
153
154
FileUtils . touch 'grpc_c.64.ruby'
155
+ FileUtils . touch 'grpc_c.64-ucrt.ruby'
154
156
unless '2.5' == /(\d +\. \d +)/ . match ( RUBY_VERSION ) . to_s
155
157
fail "rake gem:native (the rake task to build the binary packages) is being " \
156
158
"invoked on macos with ruby #{ RUBY_VERSION } . The ruby macos artifact " \
@@ -168,7 +170,7 @@ task 'gem:native', [:plat] do |t, args|
168
170
prepare_ccache_cmd += "export PATH=\" $PATH:/usr/local/bin\" && "
169
171
prepare_ccache_cmd += "source tools/internal_ci/helper_scripts/prepare_ccache_symlinks_rc "
170
172
171
- supported_windows_platforms = [ 'x86-mingw32' , 'x64-mingw32' ]
173
+ supported_windows_platforms = [ 'x86-mingw32' , 'x64-mingw32' , 'x64-mingw-ucrt' ]
172
174
supported_unix_platforms = [ 'x86_64-linux' , 'x86-linux' , 'x86_64-darwin' , 'arm64-darwin' ]
173
175
supported_platforms = supported_windows_platforms + supported_unix_platforms
174
176
@@ -210,6 +212,7 @@ task 'gem:native', [:plat] do |t, args|
210
212
# them to take up space in the gems that don't target windows.
211
213
File . truncate ( 'grpc_c.32.ruby' , 0 )
212
214
File . truncate ( 'grpc_c.64.ruby' , 0 )
215
+ File . truncate ( 'grpc_c.64-ucrt.ruby' , 0 )
213
216
214
217
unix_platforms . each do |plat |
215
218
run_rake_compiler ( plat , <<~EOT )
0 commit comments