* fixup: genscript now does not copy nimbase.h but uses -I$nim/lib
This commit is contained in:
parent
c56612ff96
commit
5010bc1af5
1 changed files with 4 additions and 9 deletions
|
|
@ -501,10 +501,7 @@ proc generateScript(conf: ConfigRef; script: Rope) =
|
||||||
let (_, name, _) = splitFile(conf.outFile.string)
|
let (_, name, _) = splitFile(conf.outFile.string)
|
||||||
let filename = getNimcacheDir(conf) / RelativeFile(addFileExt("compile_" & name,
|
let filename = getNimcacheDir(conf) / RelativeFile(addFileExt("compile_" & name,
|
||||||
platform.OS[conf.target.targetOS].scriptExt))
|
platform.OS[conf.target.targetOS].scriptExt))
|
||||||
if writeRope(script, filename):
|
if not writeRope(script, filename):
|
||||||
copyFile(conf.libpath / RelativeFile"nimbase.h",
|
|
||||||
getNimcacheDir(conf) / RelativeFile"nimbase.h")
|
|
||||||
else:
|
|
||||||
rawMessage(conf, errGenerated, "could not write to file: " & filename.string)
|
rawMessage(conf, errGenerated, "could not write to file: " & filename.string)
|
||||||
|
|
||||||
proc getOptSpeed(conf: ConfigRef; c: TSystemCC): string =
|
proc getOptSpeed(conf: ConfigRef; c: TSystemCC): string =
|
||||||
|
|
@ -607,17 +604,15 @@ proc getCompileCFileCmd*(conf: ConfigRef; cfile: Cfile,
|
||||||
ospNeedsPIC in platform.OS[conf.target.targetOS].props:
|
ospNeedsPIC in platform.OS[conf.target.targetOS].props:
|
||||||
options.add(' ' & CC[c].pic)
|
options.add(' ' & CC[c].pic)
|
||||||
|
|
||||||
var includeCmd, compilePattern: string
|
var compilePattern: string
|
||||||
|
# compute include paths:
|
||||||
|
var includeCmd = CC[c].includeCmd & quoteShell(conf.libpath)
|
||||||
if not noAbsolutePaths(conf):
|
if not noAbsolutePaths(conf):
|
||||||
# compute include paths:
|
|
||||||
includeCmd = CC[c].includeCmd & quoteShell(conf.libpath)
|
|
||||||
|
|
||||||
for includeDir in items(conf.cIncludes):
|
for includeDir in items(conf.cIncludes):
|
||||||
includeCmd.add(join([CC[c].includeCmd, includeDir.quoteShell]))
|
includeCmd.add(join([CC[c].includeCmd, includeDir.quoteShell]))
|
||||||
|
|
||||||
compilePattern = joinPath(conf.cCompilerPath, exe)
|
compilePattern = joinPath(conf.cCompilerPath, exe)
|
||||||
else:
|
else:
|
||||||
includeCmd = ""
|
|
||||||
compilePattern = getCompilerExe(conf, c, cfile.cname)
|
compilePattern = getCompilerExe(conf, c, cfile.cname)
|
||||||
|
|
||||||
includeCmd.add(join([CC[c].includeCmd, quoteShell(conf.projectPath.string)]))
|
includeCmd.add(join([CC[c].includeCmd, quoteShell(conf.projectPath.string)]))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue