summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-06-26 18:31:35 +0200
committerGitHub <noreply@github.com>2018-06-26 18:31:35 +0200
commitd08b9eb6731a70504be6d856723fbc94dc7bd506 (patch)
tree59e7e3395ddaf3251e86952c42dd9f40d3889ea8
parent5976bd96be3d14e033005333d8ddab85b2ee7874 (diff)
parent7e89f9a09a2b181fae6e6e3caaf7bea781c3e864 (diff)
downloadNim-d08b9eb6731a70504be6d856723fbc94dc7bd506.tar.gz
Merge pull request #8123 from jwollen/cfile_extensions
Don't remove extension of source files twice, if filenames contain dots
-rw-r--r--compiler/extccomp.nim2
-rw-r--r--compiler/pragmas.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index 615b8c1e1..17133624b 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -603,7 +603,7 @@ proc addExternalFileToCompile*(conf: ConfigRef; c: var Cfile) =
 
 proc addExternalFileToCompile*(conf: ConfigRef; filename: string) =
   var c = Cfile(cname: filename,
-    obj: toObjFile(conf, completeCFilePath(conf, changeFileExt(filename, ""), false)),
+    obj: toObjFile(conf, completeCFilePath(conf, filename, false)),
     flags: {CfileFlag.External})
   addExternalFileToCompile(conf, c)
 
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index c78a3519c..afe60e9dd 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -466,7 +466,7 @@ proc processCompile(c: PContext, n: PNode) =
       else:
         found = findFile(c.config, s)
         if found.len == 0: found = s
-    let obj = toObjFile(c.config, completeCFilePath(c.config, changeFileExt(found, ""), false))
+    let obj = toObjFile(c.config, completeCFilePath(c.config, found, false))
     docompile(c, it, found, obj)
 
 proc processCommonLink(c: PContext, n: PNode, feature: TLinkFeature) =