Use `out` compiler option when linking static library
This commit is contained in:
parent
aedafb9978
commit
b99f3743e7
1 changed files with 8 additions and 2 deletions
|
|
@ -659,8 +659,14 @@ proc compileCFile(list: TLinkedList, script: var Rope, cmds: var TStringSeq,
|
||||||
|
|
||||||
proc getLinkCmd(projectfile, objfiles: string): string =
|
proc getLinkCmd(projectfile, objfiles: string): string =
|
||||||
if optGenStaticLib in gGlobalOptions:
|
if optGenStaticLib in gGlobalOptions:
|
||||||
let name = splitFile(gProjectName).name
|
var libname: string
|
||||||
result = CC[cCompiler].buildLib % ["libfile", (libNameTmpl() % name),
|
if options.outFile.len > 0:
|
||||||
|
libname = options.outFile.expandTilde
|
||||||
|
if not libname.isAbsolute():
|
||||||
|
libname = getCurrentDir() / libname
|
||||||
|
else:
|
||||||
|
libname = (libNameTmpl() % splitFile(gProjectName).name)
|
||||||
|
result = CC[cCompiler].buildLib % ["libfile", libname,
|
||||||
"objfiles", objfiles]
|
"objfiles", objfiles]
|
||||||
else:
|
else:
|
||||||
var linkerExe = getConfigVar(cCompiler, ".linkerexe")
|
var linkerExe = getConfigVar(cCompiler, ".linkerexe")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue