module HostPlatform

Public Class Methods

config(host_options, build_config) click to toggle source
# File lib/mundler/platforms/host.rb, line 2
def self.config(host_options, build_config)
  build = ""
  options = host_options[:options]

  if options[:cc]
    build += "  conf.cc do |cc|\n"
    build += "    cc.command = #{options[:cc][:command].inspect}\n" if options[:cc][:command]
    build += "    cc.flags << #{options[:cc][:flags].inspect}\n" if options[:cc][:flags]
    build += "  end\n\n"
  end

  if options[:linker]
    build += "  conf.linker do |linker|\n"
    build += "    linker.command = #{options[:linker][:command].inspect}\n" if options[:linker][:command]
    build += "    linker.flags << #{options[:linker][:flags].inspect}\n" if options[:linker][:flags]
    build += "  end\n\n"
  end

  build
end