Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add antler-proj to cdt #114

Merged
merged 20 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .cicd/platforms/ubuntu18.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved
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

Expand All @@ -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
ENV CXX=g++-8
5 changes: 4 additions & 1 deletion .cicd/platforms/ubuntu20.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion .cicd/platforms/ubuntu22.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions modules/InstallCDT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
1 change: 1 addition & 0 deletions scripts/generate_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 4 additions & 0 deletions scripts/generate_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 13 additions & 2 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 $<TARGET_FILE:${name}> ${CMAKE_BINARY_DIR}/bin/ )
endmacro()

Expand All @@ -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 $<TARGET_FILE:antler-proj> ${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
)
3 changes: 2 additions & 1 deletion tools/external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
add_subdirectory(wabt)
add_subdirectory(eos-vm)
add_subdirectory(eos-vm)
add_subdirectory(antler-proj)
1 change: 1 addition & 0 deletions tools/external/antler-proj
Submodule antler-proj added at 25b54b