Use common compiler settings from Cable

This commit is contained in:
Paweł Bylica 2018-04-11 14:56:14 +02:00
parent a524726b2e
commit 4578e80c38
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
2 changed files with 8 additions and 8 deletions

View File

@ -10,6 +10,7 @@ if(TARGET evmc)
endif()
include(cmake/cable/bootstrap.cmake)
include(CableCompilerSettings)
include(HunterGate)
include(defaults/HunterCacheServers)
@ -23,6 +24,8 @@ HunterGate(
project(evmc)
cable_configure_compiler()
add_library(evmc INTERFACE)
target_include_directories(evmc INTERFACE include)

View File

@ -45,15 +45,12 @@ static void free_result_output_data(struct evmc_result const* result)
free((uint8_t*)result->output_data);
}
static struct evmc_result execute(struct evmc_instance* instance,
struct evmc_context* context,
enum evmc_revision rev,
const struct evmc_message* msg,
const uint8_t* code,
size_t code_size)
static struct evmc_result execute(struct evmc_instance* instance, struct evmc_context* context,
enum evmc_revision rev, const struct evmc_message* msg, const uint8_t* code, size_t code_size)
{
struct evmc_result ret = {};
if (code_size == 0) {
struct evmc_result ret = {EVMC_INTERNAL_ERROR};
if (code_size == 0)
{
// In case of empty code return a fancy error message.
const char* error = rev == EVMC_BYZANTIUM ?
"Welcome to Byzantium!" : "Hello Ethereum!";