mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-26 05:05:23 +00:00
Fix the cross-compilation for Windows
This commit is contained in:
parent
55ae7d3b00
commit
e6a6019ef9
@ -24,6 +24,16 @@ import
|
|||||||
# TODO(zah):
|
# TODO(zah):
|
||||||
# We can compress the embedded states with snappy before embedding them here.
|
# 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
|
export
|
||||||
ethtypes, conversions, RuntimeConfig
|
ethtypes, conversions, RuntimeConfig
|
||||||
|
|
||||||
@ -192,7 +202,7 @@ proc loadEth2NetworkMetadata*(path: string, eth1Network = none(Eth1Network)): Et
|
|||||||
proc loadCompileTimeNetworkMetadata(
|
proc loadCompileTimeNetworkMetadata(
|
||||||
path: string,
|
path: string,
|
||||||
eth1Network = none(Eth1Network)): Eth2NetworkMetadata {.raises: [Defect].} =
|
eth1Network = none(Eth1Network)): Eth2NetworkMetadata {.raises: [Defect].} =
|
||||||
if fileExists(path / "config.yaml"):
|
if fileExists(path & "/config.yaml"):
|
||||||
try:
|
try:
|
||||||
result = loadEth2NetworkMetadata(path, eth1Network)
|
result = loadEth2NetworkMetadata(path, eth1Network)
|
||||||
if result.incompatible:
|
if result.incompatible:
|
||||||
|
2
vendor/nim-kzg4844
vendored
2
vendor/nim-kzg4844
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 95978add33f743efcd46725c38fc074d96f7b5fb
|
Subproject commit d43f988daaf31b73bf1e73d6b9593a763b628b87
|
Loading…
x
Reference in New Issue
Block a user