Skip to content
Snippets Groups Projects
Commit 2bc107f7 authored by Nicolas Noble's avatar Nicolas Noble
Browse files

Making the ruby gem for MacOS work again.

parent f51a901f
No related branches found
No related tags found
No related merge requests found
...@@ -67,14 +67,15 @@ else ...@@ -67,14 +67,15 @@ else
end end
unless File.exist?(File.join(grpc_lib_dir, 'libgrpc.a')) or windows unless File.exist?(File.join(grpc_lib_dir, 'libgrpc.a')) or windows
for var in %w( CC AR ) do ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs'
ENV[var] = RbConfig::CONFIG[var] ENV['CC'] = RbConfig::CONFIG['CC']
end
ENV['LD'] = ENV['CC'] ENV['LD'] = ENV['CC']
ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/
ENV['EMBED_OPENSSL'] = 'true' ENV['EMBED_OPENSSL'] = 'true'
ENV['EMBED_ZLIB'] = 'true' ENV['EMBED_ZLIB'] = 'true'
ENV['ARCH_FLAGS'] = '-arch i386 -arch x86_64' if RUBY_PLATFORM =~ /darwin/
output_dir = File.expand_path(RbConfig::CONFIG['topdir']) output_dir = File.expand_path(RbConfig::CONFIG['topdir'])
grpc_lib_dir = File.join(output_dir, 'libs', grpc_config) grpc_lib_dir = File.join(output_dir, 'libs', grpc_config)
...@@ -107,6 +108,7 @@ puts 'Generating Makefile for ' + output ...@@ -107,6 +108,7 @@ puts 'Generating Makefile for ' + output
create_makefile(output) create_makefile(output)
strip_tool = RbConfig::CONFIG['STRIP'] strip_tool = RbConfig::CONFIG['STRIP']
strip_tool = 'strip -x' if RUBY_PLATFORM =~ /darwin/
if grpc_config == 'opt' if grpc_config == 'opt'
File.open('Makefile.new', 'w') do |o| File.open('Makefile.new', 'w') do |o|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment