Skip to content

Commit ed530f6

Browse files
committed
Don't download tar files in parallel for cross build
Otherwise they would be downloaded simultanously in two processes. This also removes cross build check, since I didn't find any reason to add it conditionally only.
1 parent 5a217ca commit ed530f6

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

Rakefile.cross

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,11 @@ class CrossLibrary < OpenStruct
250250
end
251251
end
252252

253-
if File.exist?(File.expand_path("~/.rake-compiler/config.yml"))
254-
CrossLibraries = [
255-
['x86-mingw32', 'mingw', 'i686-w64-mingw32'],
256-
['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
257-
].map do |platform, openssl_config, toolchain|
258-
CrossLibrary.new platform, openssl_config, toolchain
259-
end
260-
else
261-
$stderr.puts "Cross-compilation disabled -- rake-compiler not properly installed"
262-
CrossLibraries = []
253+
CrossLibraries = [
254+
['x86-mingw32', 'mingw', 'i686-w64-mingw32'],
255+
['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
256+
].map do |platform, openssl_config, toolchain|
257+
CrossLibrary.new platform, openssl_config, toolchain
263258
end
264259

265260
desc 'cross compile pg for win32'
@@ -290,9 +285,10 @@ task 'gem:windows:prepare' do
290285
end
291286
end
292287

293-
%w[ x86-mingw32 x64-mingw32 ].each do |platform|
288+
CrossLibraries.each do |xlib|
289+
platform = xlib.for_platform
294290
desc "Build fat binary gem for platform #{platform}"
295-
task "gem:windows:#{platform}" => ['ChangeLog', 'gem:windows:prepare'] do
291+
task "gem:windows:#{platform}" => ['ChangeLog', 'gem:windows:prepare', xlib.openssl_tarball, xlib.postgresql_tarball] do
296292
RakeCompilerDock.sh <<-EOT, platform: platform
297293
(cp build/gem/gem-*.pem ~/.gem/ || true) &&
298294
bundle install --local &&

0 commit comments

Comments
 (0)