Skip to content

Commit

Permalink
use option file for linking on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorino committed Nov 19, 2023
1 parent 3746c74 commit abb40a1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rakelib/lib/config/mingw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ def dll_mask
"{#{dll_ext},dll}"
end

def do_link(pkg)
# have to use option file for objects to link on windows because command line gets too long
ftmp = Tempfile.new('object')
ftmp.puts pkg.all_obj_files.collect { |o| File.join('..', o) }.join(' ')
ftmp.close # close but do not unlink
objs = "@#{ftmp.path}"
depsh = pkg.dep_libnames.collect { |dl| "#{dl}.#{dll_ext}" }.join(' ')
sh "cd lib && #{WXRuby3.config.ld} #{WXRuby3.config.ldflags(pkg.lib_target)} #{objs} #{depsh} " +
"#{WXRuby3.config.libs} #{WXRuby3.config.link_output_flag}#{pkg.lib_target}"
end

private

def wx_make
Expand Down

0 comments on commit abb40a1

Please sign in to comment.