From e8a79e7246b1f2276759217fa7d75a2e8399164e Mon Sep 17 00:00:00 2001 From: Jamie Lokier Date: Mon, 7 Jun 2021 15:20:13 +0100 Subject: [PATCH] EVMC: Reference EVMC entry point so it's linked into the program Even though `evmc_create_nimbus_evm` is called, it fails at link time because the definition of that function isn't included unless it is pulled in explicitly. Signed-off-by: Jamie Lokier --- nimbus/transaction/evmc_host_glue.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nimbus/transaction/evmc_host_glue.nim b/nimbus/transaction/evmc_host_glue.nim index 72c84531b..4cc632ad5 100644 --- a/nimbus/transaction/evmc_host_glue.nim +++ b/nimbus/transaction/evmc_host_glue.nim @@ -86,6 +86,10 @@ proc evmcGetHostInterface(): ref evmc_host_interface = # The built-in Nimbus EVM, via imported C function. proc evmc_create_nimbus_evm(): ptr evmc_vm {.cdecl, importc.} +# Pull in the definition of the above function because we're not building it as +# a separate library yet. +import ./evmc_vm_glue + proc evmcExecComputation*(host: TransactionHost, code: seq[byte]): EvmcResult = let vm = evmc_create_nimbus_evm() if vm.isNil: