Class: LinuxCompiler

Inherits:
GccCompiler show all
Defined in:
lib/rakepp/linuxcompiler.rb

Instance Attribute Summary

Attributes inherited from Compiler

#compileflags, #targetDir

Instance Method Summary collapse

Methods inherited from GccCompiler

#add_binary_lib_tasks, #add_exe_tasks, #add_framework_tasks, #add_lib, #add_object_tasks, #add_shared_lib_tasks, #add_source_lib_tasks, #add_transitive_library_prerequisites, #apply_task, #calc_dependencies, #compiler, #defines, #dep_missing?, #do_additional_work_for_exe, #includes, #recreate_task, #start_of_source_lib_command

Methods inherited from Compiler

#add_tasks

Constructor Details

#initialize(defines, compileflags, output_suffix = '') ⇒ LinuxCompiler

Returns a new instance of LinuxCompiler.



3
4
5
# File 'lib/rakepp/linuxcompiler.rb', line 3

def initialize(defines, compileflags, output_suffix='')
  super("linux#{output_suffix}", defines, compileflags)
end

Instance Method Details

#add_lib_prefix(lib) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/rakepp/linuxcompiler.rb', line 16

def add_lib_prefix(lib)
  if lib.forceLib
    return '-Wl,--whole-archive'
  else
    return ''
  end
end

#add_lib_suffix(lib) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/rakepp/linuxcompiler.rb', line 24

def add_lib_suffix(lib)
  if lib.forceLib
    return '-Wl,--no-whole-archive'
  else
    return ''
  end
end

#end_of_libsObject



36
37
38
# File 'lib/rakepp/linuxcompiler.rb', line 36

def end_of_libs()
  return ' -Wl,--end-group '
end

#shared_extensionObject



11
12
13
# File 'lib/rakepp/linuxcompiler.rb', line 11

def shared_extension()
  return 'so'
end

#start_of_libsObject



32
33
34
# File 'lib/rakepp/linuxcompiler.rb', line 32

def start_of_libs()
  return ' -Wl,--start-group '
end

#start_of_shared_lib_command(libName, artifact) ⇒ Object



7
8
9
# File 'lib/rakepp/linuxcompiler.rb', line 7

def start_of_shared_lib_command(libName, artifact)
  return "g++ -shared"
end