summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorYuriy Glukhov <yglukhov@users.noreply.github.com>2017-11-29 08:07:16 -0800
committerAndreas Rumpf <rumpf_a@web.de>2017-11-29 17:07:16 +0100
commit216119212c256548a3e7557d5190fe61a7b9524a (patch)
treee44a05785a334dc736df0272c0198cbe7d519a5d
parentfcad56c804127cdf8f672a7d0810ecc17d0a0e75 (diff)
downloadNim-216119212c256548a3e7557d5190fe61a7b9524a.tar.gz
Emit relative object file paths in genScript (#6835)
-rw-r--r--compiler/extccomp.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index e6b23aae5..42c341651 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -764,8 +764,9 @@ proc callCCompiler*(projectfile: string) =
       add(objfiles, quoteShell(
           addFileExt(objFile, CC[cCompiler].objExt)))
     for x in toCompile:
+      let objFile = if noAbsolutePaths(): x.obj.extractFilename else: x.obj
       add(objfiles, ' ')
-      add(objfiles, quoteShell(x.obj))
+      add(objfiles, quoteShell(objFile))
 
     linkCmd = getLinkCmd(projectfile, objfiles)
     if optCompileOnly notin gGlobalOptions: