fixes extccomp regressions
This commit is contained in:
parent
3b783f7e13
commit
1946d1a61d
1 changed files with 5 additions and 5 deletions
|
|
@ -652,13 +652,13 @@ proc compileCFile(conf: ConfigRef; list: CFileList, script: var Rope, cmds: var
|
||||||
add(script, compileCmd)
|
add(script, compileCmd)
|
||||||
add(script, "\n")
|
add(script, "\n")
|
||||||
|
|
||||||
proc getLinkCmd(conf: ConfigRef; projectfile: AbsoluteFile, objfiles: string): string =
|
proc getLinkCmd(conf: ConfigRef; projectfile: AbsoluteFile, objfiles: string; base: AbsoluteDir): string =
|
||||||
if optGenStaticLib in conf.globalOptions:
|
if optGenStaticLib in conf.globalOptions:
|
||||||
var libname: string
|
var libname: string
|
||||||
if not conf.outFile.isEmpty:
|
if not conf.outFile.isEmpty:
|
||||||
libname = conf.outFile.string.expandTilde
|
libname = conf.outFile.string.expandTilde
|
||||||
if not libname.isAbsolute():
|
if not libname.isAbsolute():
|
||||||
libname = getCurrentDir() / libname
|
libname = base.string / libname
|
||||||
else:
|
else:
|
||||||
libname = (libNameTmpl(conf) % splitFile(conf.projectName).name)
|
libname = (libNameTmpl(conf) % splitFile(conf.projectName).name)
|
||||||
result = CC[conf.cCompiler].buildLib % ["libfile", quoteShell(libname),
|
result = CC[conf.cCompiler].buildLib % ["libfile", quoteShell(libname),
|
||||||
|
|
@ -684,7 +684,7 @@ proc getLinkCmd(conf: ConfigRef; projectfile: AbsoluteFile, objfiles: string): s
|
||||||
if not conf.outFile.isEmpty:
|
if not conf.outFile.isEmpty:
|
||||||
exefile = conf.outFile.string.expandTilde
|
exefile = conf.outFile.string.expandTilde
|
||||||
if not exefile.isAbsolute():
|
if not exefile.isAbsolute():
|
||||||
exefile = getCurrentDir() / exefile
|
exefile = base.string / exefile
|
||||||
if not noAbsolutePaths(conf):
|
if not noAbsolutePaths(conf):
|
||||||
if not exefile.isAbsolute():
|
if not exefile.isAbsolute():
|
||||||
exefile = string(splitFile(projectfile).dir / RelativeFile(exefile))
|
exefile = string(splitFile(projectfile).dir / RelativeFile(exefile))
|
||||||
|
|
@ -803,7 +803,7 @@ proc callCCompiler*(conf: ConfigRef; projectfile: AbsoluteFile) =
|
||||||
add(objfiles, ' ')
|
add(objfiles, ' ')
|
||||||
add(objfiles, quoteShell(minimizeObjfileNameLen(objFile, conf)))
|
add(objfiles, quoteShell(minimizeObjfileNameLen(objFile, conf)))
|
||||||
|
|
||||||
linkCmd = getLinkCmd(conf, projectfile, objfiles)
|
linkCmd = getLinkCmd(conf, projectfile, objfiles, AbsoluteDir oldCwd)
|
||||||
if optCompileOnly notin conf.globalOptions:
|
if optCompileOnly notin conf.globalOptions:
|
||||||
execLinkCmd(conf, linkCmd)
|
execLinkCmd(conf, linkCmd)
|
||||||
finally:
|
finally:
|
||||||
|
|
@ -877,7 +877,7 @@ proc writeJsonBuildInstructions*(conf: ConfigRef; projectfile: AbsoluteFile) =
|
||||||
linkfiles(conf, f, buf, objfiles, conf.toCompile, conf.externalToLink)
|
linkfiles(conf, f, buf, objfiles, conf.toCompile, conf.externalToLink)
|
||||||
|
|
||||||
lit "],\L\"linkcmd\": "
|
lit "],\L\"linkcmd\": "
|
||||||
str getLinkCmd(conf, projectfile, objfiles)
|
str getLinkCmd(conf, projectfile, objfiles, AbsoluteDir getCurrentDir())
|
||||||
lit "\L}\L"
|
lit "\L}\L"
|
||||||
close(f)
|
close(f)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue