class MxxRu::Cpp::Toolsets::ClangMswinFamily
Toolset
implemetation for Clang compiler for Win32.
Public Instance Methods
See description at MxxRu::Cpp::Toolset#clean_dll_specific_files
.
Delete import library if exists.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 257 def clean_dll_specific_files( a_dll_file, a_dll_info, a_target ) # Delete import library if exists. if nil != a_dll_info.link_name implib_name = File.join( [ a_dll_info.link_path, lib_file_name( a_dll_info.link_name, a_target ) ] ) MxxRu::Util::delete_file( implib_name ) end end
See description at MxxRu::Cpp::Toolset#dll_file_name
.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 237 def dll_file_name( source_name, target ) return construct_target_name( source_name, NO_PREFIX, '.dll', target ) end
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 343 def enclose_linker_include_lib_options_into_brackes( options ) " #{options} " end
See description at MxxRu::Cpp::Toolset#exe_file_name
.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 227 def exe_file_name( source_name, target ) return construct_target_name( source_name, NO_PREFIX, ".exe", target ) end
See description at MxxRu::Cpp::Toolset#implib_link_name
.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 271 def implib_link_name( dll_real_name, target ) # It's required to pass import library name to linker on mswin platform if nil != target.mxx_implib_path return lib_link_name( target.mxx_target_name, target ) end return nil end
See description at MxxRu::Cpp::Toolset#implib_link_path
.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 284 def implib_link_path( dll_real_name, dll_real_path, target ) return target.mxx_obj_placement.get_lib( target.mxx_implib_path, self, target ) end
See description at MxxRu::Cpp::Toolset#lib_file_name
.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 232 def lib_file_name( source_name, target ) return construct_target_name( source_name, NO_PREFIX, '.lib', target ) end
Return command line switch for forcing specified library type.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 339 def lib_linking_mode_switch( linking_mode ) "" end
Returns librarian name.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 217 def librarian_name tag( LIBRARIAN_NAME_TAG, "llvm-ar" ) end
See description at MxxRu::Cpp::Toolset#make_dll_requirements
.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 293 def make_dll_requirements( a_dll_name, a_dll_info, a_linker_lists, a_target ) result = DllRequirements.new # Dependencies are exists only if import library is present. if nil != a_dll_info.link_name result.add_libs( [ a_dll_info.link_name ] ) result.add_lib_paths( [ a_dll_info.link_path ] ) end return result end
See description at MxxRu::Cpp::Toolset#make_lib_command_lines
.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 242 def make_lib_command_lines( lib_name, obj_files, librarian_options, target ) result = "r #{librarian_options.join(' ')} " + "#{lib_name} #{obj_files.join(' ')}" return [ "#{librarian_name} #{result}" ] end
See description at MxxRu::Cpp::Toolset#make_mswin_res_command_lines
.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 353 def make_mswin_res_command_lines( res_name, rc_file, rc_options, target ) return [ "#{rc_name} " + "#{rc_options.join(' ')} /r " + "/fo#{res_name} #{rc_file}" ] end
See description at MxxRu::Cpp::Toolset#mswin_res_file_name.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 348 def mswin_res_file_name( source_name ) return source_name + ".res" end
Return string containing port-specific linker option for DLL linking.
All parameters are similar to make_dll_command_lines parameters.
Return empty string in a base class.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 315 def port_specific_dll_link_options( a_dll_name, a_dll_info, a_linker_lists, a_target ) # Build import library if it's required. if nil != a_dll_info.link_name full_lib_name = File.join( [ a_dll_info.link_path, lib_file_name( a_dll_info.link_name, a_target ) ] ) return "-Wl,/IMPLIB:#{full_lib_name}" end return "" end
Checks library name for suffix '.lib' and return name without that suffix.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 330 def port_specific_lib_name_checker(library_name) if /\.lib$/i =~ library_name MxxRu::Util::remove_file_ext(library_name) else library_name end end
Returns resource compiler name.
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 222 def rc_name return tag( RC_NAME_TAG, "rc" ) end
See description at MxxRu::Cpp::Toolset#setup_mandatory_options
.
MxxRu::Cpp::Toolsets::ClangFamily#setup_mandatory_options
# File lib/mxx_ru/cpp/toolsets/clang_family.rb, line 191 def setup_mandatory_options( target ) super( target ) # All defines and all include_path should be applied # to resource compiler too. target.mxx_all_defines.each { |d| target.compiler_option( "-D" + d ) target.mswin_rc_option( "/d" + d ) } target.mxx_all_include_paths.each { |p| target.compiler_option( "-I" + p ) target.mswin_rc_option( "/i" + p ) } # Resource compiler specific options. target.mxx_all_mswin_rc_defines.each { |d| target.mswin_rc_option( "/d" + d ) } target.mxx_all_mswin_rc_include_paths.each { |p| target.mswin_rc_option( "/i" + p ) } end