Skip to content

Commit

Permalink
finish up
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Oct 9, 2024
1 parent cd4c151 commit 6d5a3e9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions compiler/nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

hint[XDeclaredButNotUsed]:off

# config needed for nif to import the compiler:
define:nifCompilerInPath
# allow dependencies to import the compiler via `import compiler / ...`:
path:".."
# nif uses `--path:$nim` by default, make it use the current compiler instead:
define:nifCompilerInPath

define:booting
define:nimcore
Expand Down
4 changes: 3 additions & 1 deletion compiler/nim.nim
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ import
commands, options, msgs, extccomp, main, idents, lineinfos, cmdlinehelper,
pathutils, modulegraphs

import ../dist/nif/src/[nifler/nifler, xelim/xelim, nifgram/nifgram, gear2/gear2]
when defined(testNifImports):
# temporary until nif is actually used in the compiler
import ../dist/nif/src/[nifler/nifler, xelim/xelim, nifgram/nifgram, gear2/gear2]

from std/browsers import openDefaultBrowser
from nodejs import findNodeJs
Expand Down
3 changes: 2 additions & 1 deletion koch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ proc runCI(cmd: string) =
# boot without -d:nimHasLibFFI to make sure this still works
# `--lib:lib` is needed for bootstrap on openbsd, for reasons described in
# https://github.com/nim-lang/Nim/pull/14291 (`getAppFilename` bugsfor older nim on openbsd).
kochExecFold("Boot Nim ORC", "boot -d:release -d:nimStrictMode --lib:lib")
kochExecFold("Boot Nim ORC", "boot -d:release -d:nimStrictMode --lib:lib -d:testNifImports")
# remove -d:testNifImports when nif is actually used

when false: # debugging: when you need to run only 1 test in CI, use something like this:
execFold("debugging test", "nim r tests/stdlib/tosproc.nim")
Expand Down
1 change: 1 addition & 0 deletions lib/system.nim
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ when defined(nimHasEnsureMove):
discard "implemented in injectdestructors"
else:
template ensureMove*[T](x: T): T =
# no-op for bootstrapping
x

type
Expand Down

0 comments on commit 6d5a3e9

Please sign in to comment.