From 5010bc1af5f949535f71c4e4df79ef4dd8545e04 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Fri, 17 Jan 2020 16:21:13 -0800 Subject: [PATCH] fixes #13144 (#13145) * fixup: genscript now does not copy nimbase.h but uses -I$nim/lib --- compiler/extccomp.nim | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 0db97ef9f329..e94cf87c2bc7 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -501,10 +501,7 @@ proc generateScript(conf: ConfigRef; script: Rope) = let (_, name, _) = splitFile(conf.outFile.string) let filename = getNimcacheDir(conf) / RelativeFile(addFileExt("compile_" & name, platform.OS[conf.target.targetOS].scriptExt)) - if writeRope(script, filename): - copyFile(conf.libpath / RelativeFile"nimbase.h", - getNimcacheDir(conf) / RelativeFile"nimbase.h") - else: + if not writeRope(script, filename): rawMessage(conf, errGenerated, "could not write to file: " & filename.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: 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): - # compute include paths: - includeCmd = CC[c].includeCmd & quoteShell(conf.libpath) - for includeDir in items(conf.cIncludes): includeCmd.add(join([CC[c].includeCmd, includeDir.quoteShell])) compilePattern = joinPath(conf.cCompilerPath, exe) else: - includeCmd = "" compilePattern = getCompilerExe(conf, c, cfile.cname) includeCmd.add(join([CC[c].includeCmd, quoteShell(conf.projectPath.string)]))