Navigation Menu

Skip to content

Commit

Permalink
packages windows: detect exception handling from actual dll
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhys committed Jan 28, 2015
1 parent beb019b commit 87a778a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/windows/Rakefile
Expand Up @@ -48,6 +48,9 @@ else
mecab_patches << "mecab-0.98-mingw-w64.diff"
end

use_seh_exception_p =
Pathname.new(`#{host}-g++ -print-file-name=libgcc_s_seh-1.dll`).exist?

def download(url, download_dir)
base_name = url.split("/").last
absolute_output_path = download_dir + base_name
Expand Down Expand Up @@ -317,7 +320,11 @@ namespace :gcc do
if groonga_win32_x86_p
dlls << "libgcc_s_sjlj-1.dll"
else
dlls << "libgcc_s_seh-1.dll"
if use_seh_exception_p
dlls << "libgcc_s_seh-1.dll"
else
dlls << "libgcc_s_sjlj-1.dll"
end
end
dlls.each do |dll|
full_path = `#{host}-g++ -print-file-name=#{dll}`.strip
Expand Down

0 comments on commit 87a778a

Please sign in to comment.