Class: LinuxCompiler
Instance Attribute Summary
Attributes inherited from Compiler
#compileflags, #targetDir
Instance Method Summary
collapse
Methods inherited from GccCompiler
#addBinaryLibTasks, #addExeTasks, #addFrameworkTasks, #addLib, #addObjectTasks, #addSharedLibTasks, #addSourceLibTasks, #addTransitiveLibraryPrerequisites, #calcDependencies, #compiler, #defines, #doAdditionalWorkForExe, #includes, #startOfSourceLibCommand
Methods inherited from Compiler
#addTasks
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
#addLibPrefix(lib) ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/rakepp/linuxcompiler.rb', line 16
def addLibPrefix(lib)
if lib.forceLib
return '-Wl,--whole-archive'
else
return ''
end
end
|
#addLibSuffix(lib) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/rakepp/linuxcompiler.rb', line 24
def addLibSuffix(lib)
if lib.forceLib
return '-Wl,--no-whole-archive'
else
return ''
end
end
|
#endOfLibs ⇒ Object
36
37
38
|
# File 'lib/rakepp/linuxcompiler.rb', line 36
def endOfLibs
return ' -Wl,--end-group '
end
|
#sharedExtension ⇒ Object
11
12
13
|
# File 'lib/rakepp/linuxcompiler.rb', line 11
def sharedExtension
return 'so'
end
|
#startOfLibs ⇒ Object
32
33
34
|
# File 'lib/rakepp/linuxcompiler.rb', line 32
def startOfLibs
return ' -Wl,--start-group '
end
|
#startOfSharedLibCommand(libName, artifact) ⇒ Object
7
8
9
|
# File 'lib/rakepp/linuxcompiler.rb', line 7
def startOfSharedLibCommand(libName, artifact)
return "g++ -shared"
end
|