aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/ext
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolas@nobis-crew.org>2016-02-02 23:15:22 -0800
committerGravatar Nicolas Noble <nicolas@nobis-crew.org>2016-02-02 23:15:22 -0800
commit2bc107f74c477c1127a316df6f62cc75e59b8674 (patch)
tree17d31c1ff5c376b84311a757c08ffc7803ad1383 /src/ruby/ext
parentf51a901f54d43c1cb63ec1fdbd1796c491699ee5 (diff)
Making the ruby gem for MacOS work again.
Diffstat (limited to 'src/ruby/ext')
-rw-r--r--src/ruby/ext/grpc/extconf.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
index f6f78f7810..426a6e67a0 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -67,14 +67,15 @@ else
end
unless File.exist?(File.join(grpc_lib_dir, 'libgrpc.a')) or windows
- for var in %w( CC AR ) do
- ENV[var] = RbConfig::CONFIG[var]
- end
-
+ ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs'
+ ENV['CC'] = RbConfig::CONFIG['CC']
ENV['LD'] = ENV['CC']
+ ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/
+
ENV['EMBED_OPENSSL'] = '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'])
grpc_lib_dir = File.join(output_dir, 'libs', grpc_config)
@@ -107,6 +108,7 @@ puts 'Generating Makefile for ' + output
create_makefile(output)
strip_tool = RbConfig::CONFIG['STRIP']
+strip_tool = 'strip -x' if RUBY_PLATFORM =~ /darwin/
if grpc_config == 'opt'
File.open('Makefile.new', 'w') do |o|