class MxxRu::Cpp::Toolsets::GccDarwin

Toolset implemetation for GCC compiler for MacOS X (Darwin).

Public Class Methods

new( a_name = "gcc" ) click to toggle source
Calls superclass method
# File lib/mxx_ru/cpp/toolsets/gcc_darwin.rb, line 38
def initialize( a_name = "gcc" )
  super( a_name )

  setup_tag( GCC_PORT_TAG, GCC_PORT_UNIX )
  setup_tag( "host_os", "unix" )
  setup_tag( "target_os", "unix" )
  setup_tag( "unix_port", "darwin" )
end

Public Instance Methods

dll_file_name( source_name, target ) click to toggle source

See description at MxxRu::Cpp::Toolset#dll_file_name.

If we are building bundle then extension should be '.bundle'

Calls superclass method
# File lib/mxx_ru/cpp/toolsets/gcc_darwin.rb, line 71
def dll_file_name( source_name, target )
  if target.target_type.name == MacOSBundleTargetType::TYPE
    construct_target_name( source_name, 'lib', '.bundle', target )
  else
    super
  end
end
enclose_linker_include_lib_options_into_brackes( options ) click to toggle source

There ins't any bracket on MacOS X.

# File lib/mxx_ru/cpp/toolsets/gcc_darwin.rb, line 64
def enclose_linker_include_lib_options_into_brackes( options )
  options
end
setup_mandatory_options( target ) click to toggle source
Calls superclass method
# File lib/mxx_ru/cpp/toolsets/gcc_darwin.rb, line 47
def setup_mandatory_options( target )
  super( target )

  if target.target_type.name == DllTargetType::TYPE
    target.linker_option( "-prebind" )
    target.linker_option( "-dynamiclib" )
    target.linker_option( "-single_module" )
  elsif target.target_type.name == MacOSBundleTargetType::TYPE
    target.linker_option( "-prebind" )
    target.linker_option( "-bundle" )
    target.linker_option( "-single_module" )
  elsif target.target_type.name == ExeTargetType::TYPE
    target.linker_option( "-prebind" )
  end
end