diff --git a/.cicd/platforms/ubuntu18.Dockerfile b/.cicd/platforms/ubuntu18.Dockerfile index 04df4f9c72..8f9c618be1 100644 --- a/.cicd/platforms/ubuntu18.Dockerfile +++ b/.cicd/platforms/ubuntu18.Dockerfile @@ -2,12 +2,21 @@ FROM ubuntu:bionic RUN apt-get update && apt-get upgrade -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential \ - cmake \ g++-8 \ curl \ ninja-build \ software-properties-common \ - zlib1g-dev + zlib1g-dev \ + pkg-config \ + libboost-all-dev \ + libcurl4-gnutls-dev + +RUN curl -L https://cmake.org/files/v3.13/cmake-3.13.5.tar.gz | tar zx && \ + cd cmake-3.13.5 && \ + ./configure && \ + make -j$(nproc) install && \ + cd .. && \ + rm -rf cmake-3.13.5 RUN add-apt-repository ppa:git-core/ppa && apt update && apt install -y git @@ -19,4 +28,4 @@ RUN curl -L https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tgz | tar zx rm -rf Python* ENV CC=gcc-8 -ENV CXX=g++-8 \ No newline at end of file +ENV CXX=g++-8 diff --git a/.cicd/platforms/ubuntu20.Dockerfile b/.cicd/platforms/ubuntu20.Dockerfile index d1e1f50107..c6fc3d7970 100644 --- a/.cicd/platforms/ubuntu20.Dockerfile +++ b/.cicd/platforms/ubuntu20.Dockerfile @@ -5,4 +5,7 @@ RUN apt-get update && apt-get upgrade -y && \ cmake \ git \ ninja-build \ - python3 + python3 \ + pkg-config \ + libboost-all-dev \ + libcurl4-gnutls-dev diff --git a/.cicd/platforms/ubuntu22.Dockerfile b/.cicd/platforms/ubuntu22.Dockerfile index a6b8f54c7d..67b04586a1 100644 --- a/.cicd/platforms/ubuntu22.Dockerfile +++ b/.cicd/platforms/ubuntu22.Dockerfile @@ -5,4 +5,8 @@ RUN apt-get update && apt-get upgrade -y && \ cmake \ git \ ninja-build \ - python3 + python3 \ + pkg-config \ + libboost-all-dev \ + libcurl4-gnutls-dev \ + clang-tidy diff --git a/.gitmodules b/.gitmodules index 42f9caaedb..f2c1eb62c5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "tools/external/eos-vm"] path = tools/external/eos-vm url = https://github.com/AntelopeIO/eos-vm +[submodule "tools/external/antler-proj"] + path = tools/external/antler-proj + url = https://github.com/AntelopeIO/antler-proj diff --git a/CMakeLists.txt b/CMakeLists.txt index 41479e0e21..2c276e6648 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,17 @@ configure_file(${CMAKE_SOURCE_DIR}/cdt-llvm/LICENSE.TXT ${CMAKE_BINARY_DIR}/lice configure_file(${CMAKE_SOURCE_DIR}/libraries/boost/boost.license ${CMAKE_BINARY_DIR}/licenses/boost.license COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/libraries/meta_refl/LICENSE ${CMAKE_BINARY_DIR}/licenses/meta_refl.license COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/tools/external/wabt/LICENSE ${CMAKE_BINARY_DIR}/licenses/wabt.license COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/tools/external/antler-proj/LICENSE ${CMAKE_BINARY_DIR}/licenses/antler-proj.license COPYONLY) +file(GLOB license_files ${CMAKE_SOURCE_DIR}/tools/external/antler-proj/licenses/*) +# add licenses for antler-proj submodules +foreach(full_path IN ITEMS ${license_files}) + # change format to match other license filenames + get_filename_component(file_name ${full_path} NAME) + string(REPLACE "LICENSE." "" file_name ${file_name}) + string(TOLOWER ${file_name} file_name) + set(file_name "${file_name}.license") + configure_file("${full_path}" "${CMAKE_BINARY_DIR}/licenses/${file_name}" COPYONLY) +endforeach() configure_file(${CMAKE_SOURCE_DIR}/tools/jsoncons/LICENSE ${CMAKE_BINARY_DIR}/licenses/jsoncons.license COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/LICENSE ${CMAKE_BINARY_DIR}/licenses/cdt.license COPYONLY) diff --git a/modules/InstallCDT.cmake b/modules/InstallCDT.cmake index f5b977321f..5a18b6d8b3 100644 --- a/modules/InstallCDT.cmake +++ b/modules/InstallCDT.cmake @@ -74,6 +74,7 @@ cdt_tool_install_and_symlink(cdt-cpp cdt-cpp) cdt_tool_install_and_symlink(cdt-ld cdt-ld) cdt_tool_install_and_symlink(cdt-abidiff cdt-abidiff) cdt_tool_install_and_symlink(cdt-init cdt-init) +cdt_tool_install_and_symlink(antler-proj antler-proj) cdt_clang_install(../lib/LLVMEosioApply${CMAKE_SHARED_LIBRARY_SUFFIX}) cdt_clang_install(../lib/LLVMEosioSoftfloat${CMAKE_SHARED_LIBRARY_SUFFIX}) diff --git a/scripts/generate_deb.sh b/scripts/generate_deb.sh index 92d7b09c68..4c64e8d239 100644 --- a/scripts/generate_deb.sh +++ b/scripts/generate_deb.sh @@ -19,6 +19,7 @@ NAME="${PROJECT}_${VERSION_NO_SUFFIX}-${RELEASE}_${ARCH}" mkdir -p ${PROJECT}/DEBIAN echo "Package: ${PROJECT} Version: ${VERSION_NO_SUFFIX}-${RELEASE} +Depends: libcurl4-gnutls-dev Section: devel Priority: optional Architecture: ${ARCH} diff --git a/scripts/generate_tarball.sh b/scripts/generate_tarball.sh index 271e511894..4a1ccbc5f3 100644 --- a/scripts/generate_tarball.sh +++ b/scripts/generate_tarball.sh @@ -64,6 +64,8 @@ create_symlink eosio-pp eosio-pp create_symlink cdt-init cdt-init create_symlink eosio-wasm2wast eosio-wasm2wast create_symlink eosio-wast2wasm eosio-wast2wasm +create_symlink eosio-wasm2wast cdt-wasm2wast +create_symlink eosio-wast2wasm cdt-wast2wasm create_symlink cdt-ar cdt-ar create_symlink cdt-abidiff cdt-abidiff create_symlink cdt-nm cdt-nm @@ -72,6 +74,8 @@ create_symlink cdt-objdump cdt-objdump create_symlink cdt-ranlib cdt-ranlib create_symlink cdt-readelf cdt-readelf create_symlink cdt-strip cdt-strip +create_symlink antler-proj antler-proj +create_symlink antler-proj cdt-proj echo "Generating Tarball $NAME.tar.gz..." tar -cvzf $NAME.tar.gz ./${PREFIX}/* || exit 1 diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index f788de2263..06d53ee67c 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -23,6 +23,8 @@ include_directories(${LLVM_SRCDIR}/include) include_directories(${LLVM_BINDIR}/include) link_directories(${LLVM_LIBRARY_DIRS}) add_definitions(${LLVM_DEFINITIONS}) +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + set(CMAKE_CXX_STANDARD 17) set(EOSIO_STACK_SIZE 8192) @@ -70,7 +72,6 @@ macro (add_tool name) LLVMDemangle ) - add_custom_command( TARGET ${name} POST_BUILD COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin ) add_custom_command( TARGET ${name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/bin/ ) endmacro() @@ -81,6 +82,16 @@ add_subdirectory(cc) add_subdirectory(ld) add_subdirectory(init) add_subdirectory(external) -add_subdirectory(antler-run) +#add_subdirectory(antler-run) # TODO: add back when it will be ready configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/compiler_options.hpp.in ${CMAKE_BINARY_DIR}/compiler_options.hpp) + +add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/bin/antler-proj + COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/bin/ + DEPENDS antler-proj + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/external/antler-proj/tools + ) + +add_custom_target(copy_files ALL + DEPENDS ${CMAKE_BINARY_DIR}/bin/antler-proj +) diff --git a/tools/external/CMakeLists.txt b/tools/external/CMakeLists.txt index 19ca931b9e..e486f2dcb0 100644 --- a/tools/external/CMakeLists.txt +++ b/tools/external/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(wabt) -add_subdirectory(eos-vm) \ No newline at end of file +add_subdirectory(eos-vm) +add_subdirectory(antler-proj) \ No newline at end of file diff --git a/tools/external/antler-proj b/tools/external/antler-proj new file mode 160000 index 0000000000..25b54b0ce5 --- /dev/null +++ b/tools/external/antler-proj @@ -0,0 +1 @@ +Subproject commit 25b54b0ce57224481ae78d8fcd4f16d73342a2d8