more renaming

This commit is contained in:
Bucky Kittinger
2022-05-08 21:31:34 -04:00
parent 19beabe803
commit 0ce51f569a
16 changed files with 89 additions and 91 deletions
+6 -8
View File
@@ -1,14 +1,12 @@
[submodule "libraries/libc/musl"]
path = libraries/libc/musl
url = https://github.com/eosio/musl
branch = eosio
[submodule "libraries/libc++/libcxx"]
path = libraries/libc++/libcxx
url = https://github.com/eosio/libcxx
branch = eosiosdk
[submodule "libraries/native/softfloat"]
path = libraries/native/softfloat
url = https://github.com/EOSIO/berkeley-softfloat-3.git
[submodule "cdt-llvm"]
path = cdt-llvm
url = https://github.com/eosnetworkfoundation/cdt-llvm
[submodule "libraries/libc/cdt-musl"]
path = libraries/libc/cdt-musl
url = https://github.com/eosnetworkfoundation/cdt-musl
[submodule "libraries/libc++/cdt-libcxx"]
path = libraries/libc++/cdt-libcxx
url = https://github.com/eosnetworkfoundation/cdt-libcxx
+2 -2
View File
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)
project(eosio_libraries)
project(cdt_libraries)
find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
@@ -9,7 +9,7 @@ if (CCACHE_FOUND)
endif()
list(APPEND CMAKE_MODULE_PATH ${EOSIO_CDT_BIN})
include(EosioCDTMacros)
include(CDTMacros)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -no-missing-ricardian-clause")
+12 -12
View File
@@ -5,7 +5,7 @@ SET(SRC_FILENAMES algorithm.cpp any.cpp bind.cpp charconv.cpp chrono.cpp conditi
SET(SRC_FILES "")
FOREACH(FN ${SRC_FILENAMES})
LIST(APPEND SRC_FILES "libcxx/src/${FN}")
LIST(APPEND SRC_FILES "cdt-libcxx/src/${FN}")
ENDFOREACH(FN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-everything")
@@ -17,11 +17,11 @@ add_library(c++
target_include_directories(c++
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/libcxx/include
${CMAKE_SOURCE_DIR}/libc/musl/include
${CMAKE_SOURCE_DIR}/libc/musl/src/internal
${CMAKE_SOURCE_DIR}/libc/musl/src/crypt
${CMAKE_SOURCE_DIR}/libc/musl/arch/eos)
${CMAKE_CURRENT_SOURCE_DIR}/cdt-libcxx/include
${CMAKE_SOURCE_DIR}/libc/cdt-musl/include
${CMAKE_SOURCE_DIR}/libc/cdt-musl/src/internal
${CMAKE_SOURCE_DIR}/libc/cdt-musl/src/crypt
${CMAKE_SOURCE_DIR}/libc/cdt-musl/arch/eos)
target_link_libraries(c++ c)
target_compile_definitions(c++ PUBLIC -D_LIBCPP_BUILDING_LIBRARY)
@@ -33,11 +33,11 @@ if (ENABLE_NATIVE_COMPILER)
target_include_directories(native_c++
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/libcxx/include
${CMAKE_SOURCE_DIR}/libc/musl/include
${CMAKE_SOURCE_DIR}/libc/musl/src/internal
${CMAKE_SOURCE_DIR}/libc/musl/src/crypt
${CMAKE_SOURCE_DIR}/libc/musl/arch/eos)
${CMAKE_CURRENT_SOURCE_DIR}/cdt-libcxx/include
${CMAKE_SOURCE_DIR}/libc/cdt-musl/include
${CMAKE_SOURCE_DIR}/libc/cdt-musl/src/internal
${CMAKE_SOURCE_DIR}/libc/cdt-musl/src/crypt
${CMAKE_SOURCE_DIR}/libc/cdt-musl/arch/eos)
target_link_libraries(native_c++ native_c)
target_compile_definitions(native_c++ PUBLIC -D_LIBCPP_BUILDING_LIBRARY)
@@ -45,4 +45,4 @@ if (ENABLE_NATIVE_COMPILER)
add_custom_command( TARGET native_c++ POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:native_c++> ${BASE_BINARY_DIR}/lib )
endif()
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/libcxx/include/ DESTINATION ${BASE_BINARY_DIR}/include/libcxx)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cdt-libcxx/include/ DESTINATION ${BASE_BINARY_DIR}/include/cdt-libcxx)
+34 -34
View File
@@ -1,20 +1,20 @@
file(GLOB CRYPT_SOURCES "musl/src/crypt/*.c")
file(GLOB CTYPE_SOURCES "musl/src/ctype/*.c")
file(GLOB ENV_SOURCES "musl/src/env/*.c")
file(GLOB ERRNO_SOURCES "musl/src/errno/*.c")
file(GLOB EXIT_SOURCES "musl/src/exit/*.c")
file(GLOB LOCALE_SOURCES "musl/src/locale/*.c")
file(GLOB MATH_SOURCES "musl/src/math/*.c")
file(GLOB MBYTE_SOURCES "musl/src/multibyte/*.c")
file(GLOB MISC_SOURCES "musl/src/misc/*.c")
file(GLOB SEARCH_SOURCES "musl/src/search/*.c")
file(GLOB STDIO_SOURCES "musl/src/stdio/*.c")
file(GLOB STDLIB_SOURCES "musl/src/stdlib/*.c")
file(GLOB STRING_SOURCES "musl/src/string/*.c")
file(GLOB TIME_SOURCES "musl/src/time/*.c")
file(GLOB THREAD_SOURCES "musl/src/thread/*.c") #only for __lock __unlock
file(GLOB CRYPT_SOURCES "cdt-musl/src/crypt/*.c")
file(GLOB CTYPE_SOURCES "cdt-musl/src/ctype/*.c")
file(GLOB ENV_SOURCES "cdt-musl/src/env/*.c")
file(GLOB ERRNO_SOURCES "cdt-musl/src/errno/*.c")
file(GLOB EXIT_SOURCES "cdt-musl/src/exit/*.c")
file(GLOB LOCALE_SOURCES "cdt-musl/src/locale/*.c")
file(GLOB MATH_SOURCES "cdt-musl/src/math/*.c")
file(GLOB MBYTE_SOURCES "cdt-musl/src/multibyte/*.c")
file(GLOB MISC_SOURCES "cdt-musl/src/misc/*.c")
file(GLOB SEARCH_SOURCES "cdt-musl/src/search/*.c")
file(GLOB STDIO_SOURCES "cdt-musl/src/stdio/*.c")
file(GLOB STDLIB_SOURCES "cdt-musl/src/stdlib/*.c")
file(GLOB STRING_SOURCES "cdt-musl/src/string/*.c")
file(GLOB TIME_SOURCES "cdt-musl/src/time/*.c")
file(GLOB THREAD_SOURCES "cdt-musl/src/thread/*.c") #only for __lock __unlock
set(INTERNAL_SOURCES musl/src/internal/floatscan.c musl/src/internal/intscan.c musl/src/internal/shgetc.c musl/src/internal/libc.c)
set(INTERNAL_SOURCES cdt-musl/src/internal/floatscan.c cdt-musl/src/internal/intscan.c cdt-musl/src/internal/shgetc.c cdt-musl/src/internal/libc.c)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-everything -allow-sse")
set(CMAKE_BUILD_TYPE "Release")
@@ -23,9 +23,9 @@ if(__APPLE)
add_definitions(-D__APPLE__)
endif()
file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/musl/include/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/musl/src/internal/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/musl/arch/eos/*.h")
file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/include/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/src/internal/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/arch/eos/*.h")
add_library(c
${CRYPT_SOURCES}
@@ -44,17 +44,17 @@ add_library(c
${STRING_SOURCES}
${TIME_SOURCES}
${THREAD_SOURCES}
"musl/src/malloc/posix_memalign.c"
"musl/src/malloc/memalign.c"
"cdt-musl/src/malloc/posix_memalign.c"
"cdt-musl/src/malloc/memalign.c"
${HEADERS})
target_include_directories(c
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/musl/include
${CMAKE_CURRENT_SOURCE_DIR}/musl/src/internal
${CMAKE_CURRENT_SOURCE_DIR}/musl/src/crypt
${CMAKE_CURRENT_SOURCE_DIR}/musl/arch/eos
${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/include
${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/src/internal
${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/src/crypt
${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/arch/eos
${CMAKE_SOURCE_DIR})
add_custom_command( TARGET c POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:c> ${BASE_BINARY_DIR}/lib )
@@ -77,22 +77,22 @@ if (ENABLE_NATIVE_COMPILER)
${STRING_SOURCES}
${TIME_SOURCES}
${THREAD_SOURCES}
"musl/src/malloc/posix_memalign.c"
"musl/src/malloc/memalign.c"
"cdt-musl/src/malloc/posix_memalign.c"
"cdt-musl/src/malloc/memalign.c"
${HEADERS})
target_include_directories(native_c
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/musl/include
${CMAKE_CURRENT_SOURCE_DIR}/musl/src/internal
${CMAKE_CURRENT_SOURCE_DIR}/musl/src/crypt
${CMAKE_CURRENT_SOURCE_DIR}/musl/arch/eos
${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/include
${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/src/internal
${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/src/crypt
${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/arch/eos
${CMAKE_SOURCE_DIR})
add_custom_command( TARGET native_c POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:native_c> ${BASE_BINARY_DIR}/lib )
endif()
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/musl/include/ DESTINATION ${BASE_BINARY_DIR}/include/libc/)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/musl/src/internal/ DESTINATION ${BASE_BINARY_DIR}/include/libc/)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/musl/arch/eos/ DESTINATION ${BASE_BINARY_DIR}/include/libc/)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/include/ DESTINATION ${BASE_BINARY_DIR}/include/libc/)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/src/internal/ DESTINATION ${BASE_BINARY_DIR}/include/libc/)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cdt-musl/arch/eos/ DESTINATION ${BASE_BINARY_DIR}/include/libc/)
+3 -3
View File
@@ -1,5 +1,5 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosio-abidiff.cpp.in ${CMAKE_BINARY_DIR}/eosio-abidiff.cpp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cdt-abidiff.cpp.in ${CMAKE_BINARY_DIR}/cdt-abidiff.cpp)
add_tool(eosio-abidiff)
add_tool(cdt-abidiff)
set_target_properties(eosio-abidiff PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
set_target_properties(cdt-abidiff PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
@@ -37,7 +37,7 @@ using jsoncons::ojson;
struct abidiff_exception : public std::exception {
virtual const char* what() const throw() {
return "eosio.abidiff fatal error";
return "cdt.abidiff fatal error";
}
} abidiff_ex;
@@ -296,9 +296,9 @@ class abidiff {
int main(int argc, const char **argv) {
cl::SetVersionPrinter([](llvm::raw_ostream& os) {
os << "eosio-abidiff version " << "${VERSION_FULL}" << "\n";
os << "cdt-abidiff version " << "${VERSION_FULL}" << "\n";
});
cl::OptionCategory cat("eosio-abidiff", "generates an abi from C++ project input");
cl::OptionCategory cat("cdt-abidiff", "generates an abi from C++ project input");
cl::opt<std::string> input_filename1(
cl::Positional,
@@ -311,7 +311,7 @@ int main(int argc, const char **argv) {
cl::Required,
cl::cat(cat));
cl::ParseCommandLineOptions(argc, argv, std::string("eosio-abidiff"));
cl::ParseCommandLineOptions(argc, argv, std::string("cdt-abidiff"));
try {
abidiff diff(input_filename1, input_filename2);
diff.diff();
+6 -6
View File
@@ -1,9 +1,9 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosio-cc.cpp.in ${CMAKE_BINARY_DIR}/eosio-cc.cpp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cdt-cc.cpp.in ${CMAKE_BINARY_DIR}/cdt-cc.cpp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosio-cpp.cpp.in ${CMAKE_BINARY_DIR}/eosio-cpp.cpp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cdt-cpp.cpp.in ${CMAKE_BINARY_DIR}/cdt-cpp.cpp)
add_tool(eosio-cc)
add_tool(eosio-cpp)
add_tool(cdt-cc)
add_tool(cdt-cpp)
set_target_properties(eosio-cc PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
set_target_properties(eosio-cpp PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
set_target_properties(cdt-cc PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
set_target_properties(cdt-cpp PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
@@ -14,7 +14,7 @@
using namespace clang::tooling;
using namespace llvm;
#define COMPILER_NAME "eosio-cc"
#define COMPILER_NAME "cdt-cc"
#include <compiler_options.hpp>
int main(int argc, const char **argv) {
@@ -34,7 +34,7 @@ int main(int argc, const char **argv) {
Options opts = CreateOptions();
if (opts.abigen) {
llvm::outs() << "Warning, ABI generation is only available with eosio-abigen or eosio-cpp\n";
llvm::outs() << "Warning, ABI generation is only available with cdt-abigen or cdt-cpp\n";
}
std::vector<std::string> outputs;
@@ -73,7 +73,7 @@ int main(int argc, const char **argv) {
for (auto input : outputs) {
new_opts.insert(new_opts.begin(), input);
}
if (!eosio::cdt::environment::exec_subprogram("eosio-ld", new_opts)) {
if (!eosio::cdt::environment::exec_subprogram("cdt-ld", new_opts)) {
for (auto input : outputs) {
llvm::sys::fs::remove(input);
}
@@ -27,7 +27,7 @@ using namespace clang::tooling;
using namespace llvm;
#define CPP_COMP 1
#define COMPILER_NAME "eosio-cpp"
#define COMPILER_NAME "cdt-cpp"
#include <compiler_options.hpp>
#include <set>
@@ -43,7 +43,7 @@ void handle_empty_abigen(const std::string& contract_name, bool has_o_opt, bool
void generate(const std::vector<std::string>& base_options, std::string input, std::string contract_name, const std::vector<std::string>& resource_paths, const std::pair<int, int>& abi_version, bool abigen, bool suppress_ricardian_warning, bool has_o_opt, bool has_contract_opt, bool warn_action_read_only) {
std::vector<std::string> options;
options.push_back("eosio-cpp");
options.push_back("cdt-cpp");
options.push_back(input); // don't remove oddity of CommonOptionsParser?
options.push_back(input);
options.push_back("--");
@@ -178,7 +178,7 @@ int main(int argc, const char **argv) {
new_opts.insert(new_opts.begin(), input);
}
if (!eosio::cdt::environment::exec_subprogram("eosio-ld", new_opts)) {
if (!eosio::cdt::environment::exec_subprogram("cdt-ld", new_opts)) {
for (auto input : outputs) {
llvm::sys::fs::remove(input);
}
+3 -3
View File
@@ -1,5 +1,5 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosio-init.cpp ${CMAKE_BINARY_DIR}/eosio-init.cpp @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cdt-init.cpp ${CMAKE_BINARY_DIR}/cdt-init.cpp @ONLY)
add_tool(eosio-init)
add_tool(cdt-init)
set_target_properties(eosio-init PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
set_target_properties(cdt-init PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
@@ -67,21 +67,21 @@ struct project {
const std::string cmake = "project(@)\n\n"
"set(EOSIO_WASM_OLD_BEHAVIOR \"Off\")\n"
"find_package(eosio.cdt)\n\n"
"find_package(cdt)\n\n"
"add_contract( @ @ @.cpp )\n"
"target_include_directories( @ PUBLIC ${CMAKE_SOURCE_DIR}/../include )\n"
"target_ricardian_directory( @ ${CMAKE_SOURCE_DIR}/../ricardian )";
const std::string cmake_extern = "include(ExternalProject)\n"
"# if no cdt root is given use default path\n"
"if(EOSIO_CDT_ROOT STREQUAL \"\" OR NOT EOSIO_CDT_ROOT)\n"
" find_package(eosio.cdt)\n"
"if(CDT_ROOT STREQUAL \"\" OR NOT CDT_ROOT)\n"
" find_package(cdt)\n"
"endif()\n\n"
"ExternalProject_Add(\n"
" @_project\n"
" SOURCE_DIR ${CMAKE_SOURCE_DIR}/src\n"
" BINARY_DIR ${CMAKE_BINARY_DIR}/@\n"
" CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake\n"
" CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CDT_ROOT}/lib/cmake/cdt/CDTWasmToolchain.cmake\n"
" UPDATE_COMMAND \"\"\n"
" PATCH_COMMAND \"\"\n"
" TEST_COMMAND \"\"\n"
@@ -101,7 +101,7 @@ struct project {
const std::string readme_bare = " --- @ Project ---\n\n"
" - How to Build -\n"
" - run the command 'eosio-cpp -abigen -o @.wasm @.cpp'\n";
" - run the command 'cdt-cpp -abigen -o @.wasm @.cpp'\n";
std::string replace_name( const std::string& in ) {
std::stringstream ss;
@@ -185,9 +185,9 @@ struct project {
int main(int argc, const char **argv) {
cl::SetVersionPrinter([](llvm::raw_ostream& os) {
os << "eosio-init version " << "@VERSION_FULL@" << "\n";
os << "cdt-init version " << "@VERSION_FULL@" << "\n";
});
cl::OptionCategory cat("eosio-init", "generates an eosio smart contract project");
cl::OptionCategory cat("cdt-init", "generates an cdt smart contract project");
cl::opt<bool> bare_opt(
"bare",
@@ -203,7 +203,7 @@ int main(int argc, const char **argv) {
cl::desc("directory to place the project"),
cl::cat(cat));
cl::ParseCommandLineOptions(argc, argv, std::string("eosio-proj"));
cl::ParseCommandLineOptions(argc, argv, std::string("cdt-proj"));
try {
if (!std::regex_match(project_name, std::regex("^[_a-zA-Z][_a-zA-Z0-9]*$"))) {
throw std::runtime_error("ERROR: invalid identifier: " + project_name + " (ensure that it is a valid C++ identifier)");
+3 -3
View File
@@ -1,5 +1,5 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosio-ld.cpp.in ${CMAKE_BINARY_DIR}/eosio-ld.cpp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cdt-ld.cpp.in ${CMAKE_BINARY_DIR}/cdt-ld.cpp)
add_tool(eosio-ld)
add_tool(cdt-ld)
set_target_properties(eosio-ld PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
set_target_properties(cdt-ld PROPERTIES LINK_FLAGS "-Wl,-rpath,\"\\$ORIGIN/../lib\"")
@@ -16,9 +16,9 @@ using namespace llvm;
int main(int argc, const char **argv) {
cl::SetVersionPrinter([](llvm::raw_ostream& os) {
os << "eosio-ld version " << "${VERSION_FULL}" << "\n";
os << "cdt-ld version " << "${VERSION_FULL}" << "\n";
});
cl::ParseCommandLineOptions(argc, argv, "eosio-ld (WebAssembly linker)");
cl::ParseCommandLineOptions(argc, argv, "cdt-ld (WebAssembly linker)");
Options opts = CreateOptions();
std::string line;