Fix the cross-compilation for Windows

This commit is contained in:
Zahary Karadjov 2023-04-27 13:36:22 +03:00
parent 55ae7d3b00
commit e6a6019ef9
No known key found for this signature in database
GPG Key ID: C1F42EAFF38D570F
2 changed files with 12 additions and 2 deletions

View File

@ -24,6 +24,16 @@ import
# TODO(zah):
# We can compress the embedded states with snappy before embedding them here.
# ATTENTION! This file is intentionally avoiding the Nim `/` operator for
# constructing paths. The standard operator is relying the `DirSep` constant
# which depends on the selected target OS (when doing cross-compilation), so
# the compile-time manipulation of paths performed here will break (e.g. when
# cross-compiling for Windows from Linux)
#
# Nim seems to need a more general solution for detecting the host OS during
# compilation, so a host OS specific separator can be used when deriving paths
# from `currentSourcePath`.
export
ethtypes, conversions, RuntimeConfig
@ -192,7 +202,7 @@ proc loadEth2NetworkMetadata*(path: string, eth1Network = none(Eth1Network)): Et
proc loadCompileTimeNetworkMetadata(
path: string,
eth1Network = none(Eth1Network)): Eth2NetworkMetadata {.raises: [Defect].} =
if fileExists(path / "config.yaml"):
if fileExists(path & "/config.yaml"):
try:
result = loadEth2NetworkMetadata(path, eth1Network)
if result.incompatible:

2
vendor/nim-kzg4844 vendored

@ -1 +1 @@
Subproject commit 95978add33f743efcd46725c38fc074d96f7b5fb
Subproject commit d43f988daaf31b73bf1e73d6b9593a763b628b87