diff --git a/.gitignore b/.gitignore index 48dec78d510..cea6c461c62 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ docs/_build #==============================================================================# bindings/go/llvm/llvm_config.go bindings/go/llvm/workdir +/.cmake_targets.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 590843c756e..03a5cae31f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # See docs/CMake.html for instructions about how to build LLVM with CMake. -cmake_minimum_required(VERSION 3.4.3) +cmake_minimum_required(VERSION 3.10) if(POLICY CMP0068) cmake_policy(SET CMP0068 NEW) @@ -295,9 +295,13 @@ set(LLVM_ALL_TARGETS # List of targets with JIT support: set(LLVM_TARGETS_WITH_JIT X86 PowerPC AArch64 ARM Mips SystemZ) -set(LLVM_TARGETS_TO_BUILD "X86" +if(APPLE) + set(LLVM_TARGETS_TO_BUILD "AArch64;ARM" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".") - +else() + set(LLVM_TARGETS_TO_BUILD "X86" + CACHE STRING "Semicolon-separated list of targets to build, or \"all\".") +endif() set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "WebAssembly" CACHE STRING "Semicolon-separated list of experimental targets to build.") diff --git a/docs/CMake.rst b/docs/CMake.rst index 91fb5282206..09166fa41ce 100644 --- a/docs/CMake.rst +++ b/docs/CMake.rst @@ -675,7 +675,7 @@ and uses them to build a simple application ``simple-tool``. .. code-block:: cmake - cmake_minimum_required(VERSION 3.4.3) + cmake_minimum_required(VERSION 3.10) project(SimpleProject) find_package(LLVM REQUIRED CONFIG) diff --git a/lib/Transforms/SysioApply/SysioApply.cpp b/lib/Transforms/SysioApply/SysioApply.cpp index 964e8ffedd1..2a8aebdcd96 100644 --- a/lib/Transforms/SysioApply/SysioApply.cpp +++ b/lib/Transforms/SysioApply/SysioApply.cpp @@ -28,7 +28,7 @@ using namespace llvm; -#define DEBUG_TYPE "eosio_apply" +#define DEBUG_TYPE "sysio_apply" static cl::opt entry_opt ( "entry", cl::desc("Specify entry point") @@ -40,14 +40,14 @@ namespace { static char ID; SysioApplyPass() : FunctionPass(ID) {} bool runOnFunction(Function &F) override { - if (F.hasFnAttribute("eosio_wasm_entry") || F.getName().equals("apply")) { + if (F.hasFnAttribute("sysio_wasm_entry") || F.getName().equals("apply")) { auto wasm_ctors = F.getParent()->getOrInsertFunction("__wasm_call_ctors", AttributeList{}, Type::getVoidTy(F.getContext())); auto wasm_dtors = F.getParent()->getOrInsertFunction("__cxa_finalize", AttributeList{}, Type::getVoidTy(F.getContext()), Type::getInt32Ty(F.getContext())); IRBuilder<> builder(&F.getEntryBlock()); builder.SetInsertPoint(&(F.getEntryBlock().front())); - auto set_contract = F.getParent()->getOrInsertFunction("eosio_set_contract_name", AttributeList{}, Type::getVoidTy(F.getContext()), Type::getInt64Ty(F.getContext())); + auto set_contract = F.getParent()->getOrInsertFunction("sysio_set_contract_name", AttributeList{}, Type::getVoidTy(F.getContext()), Type::getInt64Ty(F.getContext())); CallInst* set_contract_call = builder.CreateCall(set_contract, {F.arg_begin()}, ""); if (const Function* F_ = dyn_cast(set_contract.getCallee()->stripPointerCasts())) @@ -75,7 +75,7 @@ namespace { } char SysioApplyPass::ID = 0; -static RegisterPass X("apply_fixup", "Eosio Apply Fixups"); +static RegisterPass X("apply_fixup", "Sysio Apply Fixups"); static void registerSysioApplyPass(const PassManagerBuilder&, legacy::PassManagerBase& PM) { PM.add(new SysioApplyPass()); } static RegisterStandardPasses RegisterMyPass(PassManagerBuilder::EP_EarlyAsPossible, registerSysioApplyPass); diff --git a/lib/Transforms/SysioSoftfloat/SysioSoftfloat.cpp b/lib/Transforms/SysioSoftfloat/SysioSoftfloat.cpp index 29906cb18e6..9e6257d8544 100644 --- a/lib/Transforms/SysioSoftfloat/SysioSoftfloat.cpp +++ b/lib/Transforms/SysioSoftfloat/SysioSoftfloat.cpp @@ -29,7 +29,7 @@ using namespace llvm; -#define DEBUG_TYPE "eosio_softfloat" +#define DEBUG_TYPE "sysio_softfloat" namespace { // SysioSoftfloat - Mutate the apply function as needed @@ -38,44 +38,44 @@ namespace { SysioSoftfloatPass() : FunctionPass(ID) {} bool runOnFunction(Function &f) override { - auto f32add = f.getParent()->getOrInsertFunction("_eosio_f32_add", AttributeList{}, + auto f32add = f.getParent()->getOrInsertFunction("_sysio_f32_add", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f32sub = f.getParent()->getOrInsertFunction("_eosio_f32_sub", AttributeList{}, + auto f32sub = f.getParent()->getOrInsertFunction("_sysio_f32_sub", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f32mul = f.getParent()->getOrInsertFunction("_eosio_f32_mul", AttributeList{}, + auto f32mul = f.getParent()->getOrInsertFunction("_sysio_f32_mul", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f32div = f.getParent()->getOrInsertFunction("_eosio_f32_div", AttributeList{}, + auto f32div = f.getParent()->getOrInsertFunction("_sysio_f32_div", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f32rem = f.getParent()->getOrInsertFunction("_eosio_f32_rem", AttributeList{}, + auto f32rem = f.getParent()->getOrInsertFunction("_sysio_f32_rem", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f64add = f.getParent()->getOrInsertFunction("_eosio_f64_add", AttributeList{}, + auto f64add = f.getParent()->getOrInsertFunction("_sysio_f64_add", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f64sub = f.getParent()->getOrInsertFunction("_eosio_f64_sub", AttributeList{}, + auto f64sub = f.getParent()->getOrInsertFunction("_sysio_f64_sub", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f64mul = f.getParent()->getOrInsertFunction("_eosio_f64_mul", AttributeList{}, + auto f64mul = f.getParent()->getOrInsertFunction("_sysio_f64_mul", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f64div = f.getParent()->getOrInsertFunction("_eosio_f64_div", AttributeList{}, + auto f64div = f.getParent()->getOrInsertFunction("_sysio_f64_div", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); - auto f64rem = f.getParent()->getOrInsertFunction("_eosio_f64_rem", AttributeList{}, + auto f64rem = f.getParent()->getOrInsertFunction("_sysio_f64_rem", AttributeList{}, Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext()), Type::getFloatTy(f.getContext())); @@ -148,7 +148,7 @@ namespace { } char SysioSoftfloatPass::ID = 0; -static RegisterPass X("softfloat_fixup", "Eosio Softfloat Fixups"); +static RegisterPass X("softfloat_fixup", "Sysio Softfloat Fixups"); static void registerSysioSoftfloatPass(const PassManagerBuilder&, legacy::PassManagerBase& PM) { PM.add(new SysioSoftfloatPass()); } static RegisterStandardPasses RegisterMyPass(PassManagerBuilder::EP_EarlyAsPossible, registerSysioSoftfloatPass); diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 552ab7b2a88..c47b71b9d22 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -7,7 +7,7 @@ # Setting CMake minimum required version should be at the very top of the file # if this is the entry point. if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - cmake_minimum_required(VERSION 3.4.3) + cmake_minimum_required(VERSION 3.10) project(Runtimes C CXX ASM) endif() @@ -56,7 +56,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) set_property(GLOBAL APPEND PROPERTY SUB_COMPONENTS ${name}) endfunction() - cmake_minimum_required(VERSION 3.4.3) + cmake_minimum_required(VERSION 3.10) project(Runtimes C CXX ASM) find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) diff --git a/tools/clang b/tools/clang index 53ef792f486..a3f086228c8 160000 --- a/tools/clang +++ b/tools/clang @@ -1 +1 @@ -Subproject commit 53ef792f48629d6cbfc7b55a579870a484b07ca3 +Subproject commit a3f086228c84ffad29bfaab3ae42a0c9d5e4e9ed diff --git a/tools/lld b/tools/lld index da4a1923403..ebfdbe11726 160000 --- a/tools/lld +++ b/tools/lld @@ -1 +1 @@ -Subproject commit da4a19234037277606ec3242149c107a5a002176 +Subproject commit ebfdbe1172669fbf6fa8c9a32b44865fe625e00d diff --git a/utils/benchmark/CMakeLists.txt b/utils/benchmark/CMakeLists.txt index 38bc8c6bc95..bf002d68860 100644 --- a/utils/benchmark/CMakeLists.txt +++ b/utils/benchmark/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.10) # Tell cmake 3.0+ that it's safe to clear the PROJECT_VERSION variable in the # call to project() below.