Skip to content
Snippets Groups Projects
Commit 38ba85ce authored by Alexander Polcyn's avatar Alexander Polcyn
Browse files

allow choosing config of ruby package builds from environment variable

parent e1ec9fd3
No related branches found
No related tags found
No related merge requests found
...@@ -100,13 +100,15 @@ desc 'Build the native gem file under rake_compiler_dock' ...@@ -100,13 +100,15 @@ desc 'Build the native gem file under rake_compiler_dock'
task 'gem:native' do task 'gem:native' do
verbose = ENV['V'] || '0' verbose = ENV['V'] || '0'
grpc_config = ENV['GRPC_CONFIG'] || 'opt'
if RUBY_PLATFORM =~ /darwin/ if RUBY_PLATFORM =~ /darwin/
FileUtils.touch 'grpc_c.32.ruby' FileUtils.touch 'grpc_c.32.ruby'
FileUtils.touch 'grpc_c.64.ruby' FileUtils.touch 'grpc_c.64.ruby'
system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose}" system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
else else
Rake::Task['dlls'].execute Rake::Task['dlls'].execute
docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose}" docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
end end
end end
......
...@@ -91,6 +91,10 @@ if grpc_config == 'gcov' ...@@ -91,6 +91,10 @@ if grpc_config == 'gcov'
$LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic' $LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic'
end end
if grpc_config == 'dbg'
$CFLAGS << ' -O0'
end
$LDFLAGS << ' -Wl,-wrap,memcpy' if RUBY_PLATFORM =~ /linux/ $LDFLAGS << ' -Wl,-wrap,memcpy' if RUBY_PLATFORM =~ /linux/
$LDFLAGS << ' -static' if windows $LDFLAGS << ' -static' if windows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment