Skip to content

Commit

Permalink
Fix: conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank-AFN committed Mar 11, 2020
2 parents 00fca5e + 321cf3d commit 2abc857
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
40 changes: 39 additions & 1 deletion libraries/chain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,38 @@ if("wavm" IN_LIST EOSIO_WASM_RUNTIMES)
set(CHAIN_WAVM_SOURCES "webassembly/wavm.cpp")
endif()

if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
set(CHAIN_EOSVMOC_SOURCES webassembly/eos-vm-oc/code_cache.cpp
webassembly/eos-vm-oc/executor.cpp
webassembly/eos-vm-oc/memory.cpp
webassembly/eos-vm-oc/intrinsic.cpp
webassembly/eos-vm-oc/LLVMJIT.cpp
webassembly/eos-vm-oc/LLVMEmitIR.cpp
webassembly/eos-vm-oc/compile_monitor.cpp
webassembly/eos-vm-oc/compile_trampoline.cpp
webassembly/eos-vm-oc/ipc_helpers.cpp
webassembly/eos-vm-oc/gs_seg_helpers.c
webassembly/eos-vm-oc.cpp)

if(LLVM_VERSION VERSION_LESS 7.1 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
enable_language(ASM-LLVMWAR)
list(APPEND CHAIN_EOSVMOC_SOURCES webassembly/eos-vm-oc/llvmWARshim.llvmwar)
else()
list(APPEND CHAIN_EOSVMOC_SOURCES webassembly/eos-vm-oc/llvmWARshim.cpp)
endif()

llvm_map_components_to_libnames(LLVM_LIBS support core passes mcjit native orcjit)
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})

option(EOSVMOC_ENABLE_DEVELOPER_OPTIONS "enable developer options for EOS VM OC" OFF)
endif()

if("eos-vm" IN_LIST EOSIO_WASM_RUNTIMES OR "eos-vm-jit" IN_LIST EOSIO_WASM_RUNTIMES)
set(CHAIN_EOSVM_SOURCES "webassembly/eos-vm.cpp")
set(CHAIN_EOSVM_LIBRARIES eos-vm)
endif()

## SORT .cpp by most likely to change / break compile
add_library( eosio_chain
merkle.cpp
Expand Down Expand Up @@ -56,6 +88,8 @@ add_library( eosio_chain

webassembly/wavm.cpp
webassembly/wabt.cpp
${CHAIN_EOSVMOC_SOURCES}
${CHAIN_EOSVM_SOURCES}

# get_config.cpp
# global_property_object.cpp
Expand All @@ -71,15 +105,19 @@ add_library( eosio_chain
)

target_link_libraries( eosio_chain fc chainbase Logging IR WAST WASM Runtime
softfloat builtins wabt
softfloat builtins wabt ${CHAIN_EOSVM_LIBRARIES} ${LLVM_LIBS}
)
target_include_directories( eosio_chain
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../wasm-jit/Include"
"${CMAKE_CURRENT_SOURCE_DIR}/libraries/eos-vm/include"
"${CMAKE_SOURCE_DIR}/libraries/wabt"
"${CMAKE_BINARY_DIR}/libraries/wabt"
)

if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
target_link_libraries(eosio_chain "-Wl,-wrap=main")
endif()

foreach(RUNTIME ${EOSIO_WASM_RUNTIMES})
string(TOUPPER "${RUNTIME}" RUNTIMEUC)
Expand Down
4 changes: 2 additions & 2 deletions scripts/eosio_build_darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
printf "\\tExiting now.\\n\\n"
exit 1;
fi
if ! git clone --depth 1 --single-branch --branch release_70 https://github.com/llvm-mirror/llvm.git
if ! git clone --depth 1 --single-branch --branch release_90 https://github.com/llvm-mirror/llvm.git
then
printf "\\tUnable to clone llvm repo @ https://github.com/llvm-mirror/llvm.git.\\n"
printf "\\tExiting now.\\n\\n"
Expand All @@ -444,7 +444,7 @@
printf "\\tExiting now.\\n\\n"
exit 1;
fi
if ! git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git
if ! git clone --depth 1 --single-branch --branch release_90 https://github.com/llvm-mirror/clang.git
then
printf "\\tUnable to clone clang repo @ https://github.com/llvm-mirror/clang.git.\\n"
printf "\\tExiting now.\\n\\n"
Expand Down

0 comments on commit 2abc857

Please sign in to comment.