diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-06-24 00:58:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-24 00:58:11 -0700 |
commit | 55c1953f636ff2d2e2b9e9599194fa6c3fb49050 (patch) | |
tree | e6d5c272c9b4786fe73fa04cc1962bb4f515a05a /compiler/nim.nim | |
parent | f258e4e70c31b6e051d4333615a37a29b30aa0b9 (diff) | |
download | Nim-55c1953f636ff2d2e2b9e9599194fa6c3fb49050.tar.gz |
fix #18334: handle path with spaces on windows during bootstrap (#18337)
Diffstat (limited to 'compiler/nim.nim')
-rw-r--r-- | compiler/nim.nim | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/compiler/nim.nim b/compiler/nim.nim index f18238f60..91b1bc2db 100644 --- a/compiler/nim.nim +++ b/compiler/nim.nim @@ -7,21 +7,24 @@ # distribution, for details about the copyright. # -when defined(gcc) and defined(windows): - when defined(x86): - {.link: "../icons/nim.res".} - else: - {.link: "../icons/nim_icon.o".} +import std/[os, strutils, parseopt] +when defined(windows) and not defined(nimKochBootstrap): + # remove workaround pending bootstrap >= 1.5.1 + # refs https://github.com/nim-lang/Nim/issues/18334#issuecomment-867114536 + # alternative would be to prepend `currentSourcePath.parentDir.quoteShell` + when defined(gcc): + when defined(x86): + {.link: "../icons/nim.res".} + else: + {.link: "../icons/nim_icon.o".} -when defined(amd64) and defined(windows) and defined(vcc): - {.link: "../icons/nim-amd64-windows-vcc.res".} -when defined(i386) and defined(windows) and defined(vcc): - {.link: "../icons/nim-i386-windows-vcc.res".} + when defined(amd64) and defined(vcc): + {.link: "../icons/nim-amd64-windows-vcc.res".} + when defined(i386) and defined(vcc): + {.link: "../icons/nim-i386-windows-vcc.res".} import - commands, options, msgs, - extccomp, strutils, os, main, parseopt, - idents, lineinfos, cmdlinehelper, + commands, options, msgs, extccomp, main, idents, lineinfos, cmdlinehelper, pathutils, modulegraphs from browsers import openDefaultBrowser |