From b1351d23f52759fc67deb29625aa673fb6c5e2ef Mon Sep 17 00:00:00 2001 From: Michał Zieliński Date: Wed, 14 Jan 2015 20:16:35 +0100 Subject: quote filenames in when invoking compiler from C backend --- compiler/extccomp.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index ad9c38904..d61594cba 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -548,7 +548,7 @@ proc getCompileCFileCmd*(cfilename: string, isExternal = false): string = completeCFilePath(toObjFile(cfile)) objfile = quoteShell(objfile) result = quoteShell(compilePattern % [ - "file", cfile, "objfile", objfile, "options", options, + "file", quoteShell(cfile), "objfile", quoteShell(objfile), "options", options, "include", includeCmd, "nimrod", getPrefixDir(), "nim", getPrefixDir(), "lib", libpath]) add(result, ' ') @@ -717,4 +717,3 @@ proc writeMapping*(gSymbolMapping: PRope) = appf(code, "\n[Symbols]$n$1", [gSymbolMapping]) writeRope(code, joinPath(gProjectPath, "mapping.txt")) - -- cgit 1.4.1-2-gfad0 From d630f72b8112b4ec7ff6340b9969df0d6d201cd9 Mon Sep 17 00:00:00 2001 From: Varriount Date: Sat, 17 Jan 2015 20:17:36 -0500 Subject: Fixes #1955 --- compiler/extccomp.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index d61594cba..bc888315f 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -332,7 +332,6 @@ const ucc(), icl()] -const hExt* = ".h" var @@ -547,8 +546,9 @@ proc getCompileCFileCmd*(cfilename: string, isExternal = false): string = else: completeCFilePath(toObjFile(cfile)) objfile = quoteShell(objfile) + cfile = quoteShell(cfile) result = quoteShell(compilePattern % [ - "file", quoteShell(cfile), "objfile", quoteShell(objfile), "options", options, + "file", cfile, "objfile", objfile, "options", options, "include", includeCmd, "nimrod", getPrefixDir(), "nim", getPrefixDir(), "lib", libpath]) add(result, ' ') -- cgit 1.4.1-2-gfad0 From 66a9be4e026b0b9c9756a68513ff691b35d5759f Mon Sep 17 00:00:00 2001 From: Varriount Date: Sat, 17 Jan 2015 21:20:25 -0500 Subject: Add filename space test --- tests/misc/tspace in filename.nim | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/misc/tspace in filename.nim diff --git a/tests/misc/tspace in filename.nim b/tests/misc/tspace in filename.nim new file mode 100644 index 000000000..8db4b52f2 --- /dev/null +++ b/tests/misc/tspace in filename.nim @@ -0,0 +1,3 @@ +# Test for the compiler to be able to compile a Nim file with spaces in it. + +echo("Successful") \ No newline at end of file -- cgit 1.4.1-2-gfad0 45c'>tree)
1
2
3
4
5
6
7
8
9