Work-around a Nim 1.6 issue in the handling of the NBS paths file (#4253)

This commit is contained in:
zah 2022-10-21 22:48:43 +03:00 committed by GitHub
parent 367e7052f4
commit 2536db1b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -2,8 +2,14 @@ import strutils
--noNimblePath --noNimblePath
const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)]
if getEnv("NIMBUS_BUILD_SYSTEM") == "yes" and if getEnv("NIMBUS_BUILD_SYSTEM") == "yes" and
system.fileExists("nimbus-build-system.paths"): # BEWARE
# In Nim 1.6, config files are evaluated with a working directory
# matching where the Nim command was invocated. This means that we
# must do all file existance checks with full absolute paths:
system.fileExists(currentDir & "nimbus-build-system.paths"):
include "nimbus-build-system.paths" include "nimbus-build-system.paths"
const nimCachePathOverride {.strdefine.} = "" const nimCachePathOverride {.strdefine.} = ""
@ -130,7 +136,6 @@ switch("passL", "-fno-omit-frame-pointer")
# for heap-usage-by-instance-type metrics and object base-type strings # for heap-usage-by-instance-type metrics and object base-type strings
--define:nimTypeNames --define:nimTypeNames
const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)]
switch("define", "nim_compiler_path=" & currentDir & "env.sh nim") switch("define", "nim_compiler_path=" & currentDir & "env.sh nim")
switch("define", "withoutPCRE") switch("define", "withoutPCRE")