Skip to content

Commit 8ed7c2a

Browse files
committed
Don't build extensions for cross rubies.
The extension libraries of the ruby stdlib are not required to cross build binary gems. They just waste compilation time and disk storage. The option "--with-ext=" is supported since ruby-1.9.2, but ruby-1.8.7 just ignores this option. I verified that the cross ruby-build and building binary gems succeeds with the following ruby versions: ``` sh rake-compiler cross-ruby VERSION=1.8.7-p374 HOST=i586-mingw32msvc rake-compiler cross-ruby VERSION=1.9.3-p550 HOST=i586-mingw32msvc rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=i686-w64-mingw32 rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=x86_64-w64-mingw32 rake-compiler cross-ruby VERSION=2.1.6 HOST=i686-w64-mingw32 rake-compiler cross-ruby VERSION=2.1.6 HOST=x86_64-w64-mingw32 rake-compiler cross-ruby VERSION=2.2.2 HOST=i686-w64-mingw32 rake-compiler cross-ruby VERSION=2.2.2 HOST=x86_64-w64-mingw32 ``` The options '--without-tk' and '--without-tcl' are obsolete since ruby 1.8.7. I already use this patch as part of the [rake-compiler-dock](https://github.com/larskanis/rake-compiler-dock) .
1 parent 761c393 commit 8ed7c2a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tasks/bin/cross-ruby.rake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ file "#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/Makefile" => ["#{USER
135135
"--build=#{RUBY_BUILD}",
136136
'--enable-shared',
137137
'--disable-install-doc',
138-
'--without-tk',
139-
'--without-tcl'
138+
'--with-ext='
140139
]
141140

142141
# Force Winsock2 for Ruby 1.8, 1.9 defaults to it

0 commit comments

Comments
 (0)