diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 615b8c1e1c..17133624b4 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 c78a3519cf..afe60e9dd9 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) =