* properly fix https://github.com/nim-lang/Nim/issues/12389 * use --lib:lib in koch.nim.cfg instead * third time is the charm
This commit is contained in:
parent
a39123c93c
commit
b8ec07f19e
4 changed files with 18 additions and 7 deletions
|
|
@ -24,7 +24,7 @@ import
|
||||||
idents, lineinfos, cmdlinehelper,
|
idents, lineinfos, cmdlinehelper,
|
||||||
pathutils
|
pathutils
|
||||||
|
|
||||||
from browsers import openDefaultBrowser
|
from std/browsers import openDefaultBrowser
|
||||||
from nodejs import findNodeJs
|
from nodejs import findNodeJs
|
||||||
|
|
||||||
when hasTinyCBackend:
|
when hasTinyCBackend:
|
||||||
|
|
|
||||||
12
koch.nim
12
koch.nim
|
|
@ -27,8 +27,10 @@ when defined(amd64) and defined(windows) and defined(vcc):
|
||||||
when defined(i386) and defined(windows) and defined(vcc):
|
when defined(i386) and defined(windows) and defined(vcc):
|
||||||
{.link: "icons/koch-i386-windows-vcc.res".}
|
{.link: "icons/koch-i386-windows-vcc.res".}
|
||||||
|
|
||||||
import
|
import std/[os, strutils, parseopt, osproc]
|
||||||
os, strutils, parseopt, osproc
|
# Using `std/os` instead of `os` to fail early if config isn't set up properly.
|
||||||
|
# If this fails with: `Error: cannot open file: std/os`, see
|
||||||
|
# https://github.com/nim-lang/Nim/pull/14291 for explanation + how to fix.
|
||||||
|
|
||||||
import tools / kochdocs
|
import tools / kochdocs
|
||||||
import tools / deps
|
import tools / deps
|
||||||
|
|
@ -318,9 +320,13 @@ proc boot(args: string) =
|
||||||
let ret = execCmdEx(nimStart & " --version")
|
let ret = execCmdEx(nimStart & " --version")
|
||||||
doAssert ret.exitCode == 0
|
doAssert ret.exitCode == 0
|
||||||
let version = ret.output.splitLines[0]
|
let version = ret.output.splitLines[0]
|
||||||
|
# remove these when csources get updated
|
||||||
|
template addLib() =
|
||||||
|
extraOption.add " --lib:lib" # see https://github.com/nim-lang/Nim/pull/14291
|
||||||
if version.startsWith "Nim Compiler Version 0.19.0":
|
if version.startsWith "Nim Compiler Version 0.19.0":
|
||||||
extraOption.add " -d:nimBoostrapCsources0_19_0"
|
extraOption.add " -d:nimBoostrapCsources0_19_0"
|
||||||
# remove this when csources get updated
|
addLib()
|
||||||
|
elif version.startsWith "Nim Compiler Version 0.20.0": addLib()
|
||||||
|
|
||||||
# in order to use less memory, we split the build into two steps:
|
# in order to use less memory, we split the build into two steps:
|
||||||
# --compileOnly produces a $project.json file and does not run GCC/Clang.
|
# --compileOnly produces a $project.json file and does not run GCC/Clang.
|
||||||
|
|
|
||||||
|
|
@ -1 +1,7 @@
|
||||||
-d:booting
|
-d:booting
|
||||||
|
|
||||||
|
@if openbsd:
|
||||||
|
# because openbsd getAppFilename was broken in v0.20.0
|
||||||
|
# workaround see https://github.com/nim-lang/Nim/pull/14291
|
||||||
|
--lib:lib
|
||||||
|
@end
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,7 @@ since (1, 1):
|
||||||
type StaticParam*[value: static type] = object
|
type StaticParam*[value: static type] = object
|
||||||
## used to wrap a static value in `genericParams`
|
## used to wrap a static value in `genericParams`
|
||||||
|
|
||||||
# NOTE: See https://github.com/nim-lang/Nim/issues/13758 - `import std/macros` does not work on OpenBSD
|
import std/macros
|
||||||
import macros
|
|
||||||
|
|
||||||
macro genericParamsImpl(T: typedesc): untyped =
|
macro genericParamsImpl(T: typedesc): untyped =
|
||||||
# auxiliary macro needed, can't do it directly in `genericParams`
|
# auxiliary macro needed, can't do it directly in `genericParams`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue