mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 14:25:23 +00:00
Merge pull request #5124 from vegansk/fix_lib_out
Use ``out`` compiler option when linking static library
This commit is contained in:
@@ -659,8 +659,14 @@ proc compileCFile(list: TLinkedList, script: var Rope, cmds: var TStringSeq,
|
||||
|
||||
proc getLinkCmd(projectfile, objfiles: string): string =
|
||||
if optGenStaticLib in gGlobalOptions:
|
||||
let name = splitFile(gProjectName).name
|
||||
result = CC[cCompiler].buildLib % ["libfile", (libNameTmpl() % name),
|
||||
var libname: string
|
||||
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]
|
||||
else:
|
||||
var linkerExe = getConfigVar(cCompiler, ".linkerexe")
|
||||
|
||||
Reference in New Issue
Block a user