Skip to content

Commit

Permalink
Fixing dll hell.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble committed Jan 29, 2016
1 parent 1723044 commit 2283ff6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ruby/ext/grpc/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@
$CFLAGS << ' -Werror '
$CFLAGS << ' -Wno-format '

case RUBY_PLATFORM
when /mingw|mswin/
$LDFLAGS << ' -static '
end

subdir = RUBY_VERSION.sub(/\.\d$/,'')
output = File.join('grpc', 'grpc')
puts 'Generating Makefile for ' + output
Expand Down
3 changes: 3 additions & 0 deletions third_party/rake-compiler-dock/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ RUN mv /opt/mingw/mingw32/bin/i686-w64-mingw32-strip /opt/mingw/mingw32/bin/i686
RUN find / -name rbconfig.rb | while read f ; do sed -i 's/0x0501/0x0600/' $f ; done
RUN find / -name win32.h | while read f ; do sed -i 's/gettimeofday/rb_gettimeofday/' $f ; done
RUN sed -i 's/defined.__MINGW64__.$/1/' /usr/local/rake-compiler/ruby/i686-w64-mingw32/ruby-2.0.0-p645/include/ruby-2.0.0/ruby/win32.h
RUN find / -name libwinpthread.dll.a | while read f ; do rm $f ; done
RUN find / -name libwinpthread-1.dll | while read f ; do rm $f ; done
RUN find / -name *msvcrt-ruby*.dll.a | while read f ; do n=`echo $f | sed s/.dll//` ; mv $f $n ; done

# Install SIGINT forwarder
COPY build/sigfw.c /root/
Expand Down

0 comments on commit 2283ff6

Please sign in to comment.