diff options
author | 2016-02-03 15:03:03 -0800 | |
---|---|---|
committer | 2016-02-03 15:03:03 -0800 | |
commit | 93f884506436eb8993df1e3dd85cc4491a6a80c5 (patch) | |
tree | e31a792c1ea5e813f780c0a8e1c2744ea97977cd /src | |
parent | 5f1b21db982b20ad783d9dced9f382d302017c7a (diff) | |
parent | 2bc107f74c477c1127a316df6f62cc75e59b8674 (diff) |
Merge pull request #5031 from nicolasnoble/groar
Making the ruby gem for MacOS work again.
Diffstat (limited to 'src')
-rw-r--r-- | src/ruby/ext/grpc/extconf.rb | 10 |
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| |