Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify options for darwin platforms #178

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions tasks/bin/cross-ruby.rake
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,23 @@ file "#{build_dir}/Makefile" => [build_dir, source_dir] do |t|
# Force Winsock2 for Ruby 1.8, 1.9 defaults to it
options << "--with-winsock2" if MAJOR == "1.8"

# We need a different set of options for darwin.
# - The "-s" option breaks /usr/bin/ld, so don't use it.
# - We want to statically link some libraries for portability.
if MINGW_TARGET =~ /darwin/
options = [
"--host=#{MINGW_HOST}",
"--target=#{MINGW_TARGET}",
"--build=#{RUBY_BUILD}",
'--enable-static',
'--disable-shared',
'--disable-install-doc',
'--without-gmp',
'--with-ext=',
'LDFLAGS=-pipe',
]
end

chdir File.dirname(t.name) do
prefix = File.expand_path("../../../ruby/#{MINGW_HOST}/#{RUBY_CC_VERSION}")
options << "--prefix=#{prefix}"
Expand Down