Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #549 from EOSIO/bump_version
Browse files Browse the repository at this point in the history
Release v1.6.2
  • Loading branch information
larryk85 authored Jul 11, 2019
2 parents 4985359 + ce5d7b5 commit 0255f84
Show file tree
Hide file tree
Showing 22 changed files with 157 additions and 117 deletions.
19 changes: 6 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@ find_program(SCCACHE_FOUND sccache)
if (SCCACHE_FOUND)
message(STATUS "Using sccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE sccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK sccache)
else()
find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
message(STATUS "Using ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif()
endif()


set(VERSION_MAJOR 1)
set(VERSION_MINOR 6)
set(VERSION_PATCH 1)
set(VERSION_PATCH 2)
#set(VERSION_SUFFIX rc2)

if (VERSION_SUFFIX)
Expand All @@ -27,12 +25,7 @@ else()
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
endif()

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
message(WARNING "CMAKE_INSTALL_PREFIX is set to default path of ${CMAKE_INSTALL_PREFIX}, resetting to ${CMAKE_INSTALL_PREFIX}/eosio.cdt")
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/eosio.cdt")
elseif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
message(WARNING "CMAKE_INSTALL_PREFIX is explicitly set to /usr/local. This is not recommended.")
endif()
set(CDT_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/eosio.cdt)

include(GNUInstallDirs)

Expand All @@ -47,13 +40,13 @@ configure_file(${CMAKE_SOURCE_DIR}/modules/eosio.cdt-config.cmake ${CMAKE_BINARY
configure_file(${CMAKE_SOURCE_DIR}/modules/EosioCDTMacros.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/eosio.cdt/EosioCDTMacros.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/modules/EosioWasmToolchain.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake @ONLY)

set(CDT_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
set(CDT_ROOT_DIR ${CDT_INSTALL_PREFIX})
configure_file(${CMAKE_SOURCE_DIR}/modules/eosio.cdt-config.cmake ${CMAKE_BINARY_DIR}/modules/eosio.cdt-config.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/modules/eosio.cdt-config.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/eosio.cdt)
configure_file(${CMAKE_SOURCE_DIR}/modules/EosioCDTMacros.cmake.in ${CMAKE_BINARY_DIR}/modules/EosioCDTMacros.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/modules/EosioWasmToolchain.cmake.in ${CMAKE_BINARY_DIR}/modules/EosioWasmToolchain.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioWasmToolchain.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/eosio.cdt)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioCDTMacros.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/eosio.cdt)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioCDTMacros.cmake DESTINATION ${CDT_INSTALL_PREFIX}/lib/cmake/eosio.cdt)

set(CDT_ROOT_DIR "_PREFIX_")
configure_file(${CMAKE_SOURCE_DIR}/modules/EosioCDTMacros.cmake.in ${CMAKE_BINARY_DIR}/modules/EosioCDTMacrosPackage.cmake @ONLY)
Expand All @@ -65,10 +58,10 @@ include(modules/LibrariesExternalProject.txt)
include(modules/InstallCDT.cmake)

configure_file(${CMAKE_SOURCE_DIR}/imports/eosio.imports.in ${CMAKE_BINARY_DIR}/eosio.imports COPYONLY)
install(FILES ${CMAKE_BINARY_DIR}/eosio.imports DESTINATION ${CMAKE_INSTALL_PREFIX})
install(FILES ${CMAKE_BINARY_DIR}/eosio.imports DESTINATION ${CDT_INSTALL_PREFIX})

configure_file(${CMAKE_SOURCE_DIR}/scripts/ricardeos/ricardeos.py ${CMAKE_BINARY_DIR}/scripts/ricardeos.py COPYONLY)
install(FILES ${CMAKE_BINARY_DIR}/scripts/ricardeos.py DESTINATION ${CMAKE_INSTALL_PREFIX}/scripts)
install(FILES ${CMAKE_BINARY_DIR}/scripts/ricardeos.py DESTINATION ${CDT_INSTALL_PREFIX}/scripts)

# section for package construction
set(VENDOR "block.one")
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# EOSIO.CDT (Contract Development Toolkit)
## Version : 1.6.1
## Version : 1.6.2

EOSIO.CDT is a toolchain for WebAssembly (WASM) and set of tools to facilitate contract writing for the EOSIO platform. In addition to being a general purpose WebAssembly toolchain, [EOSIO](https://github.com/eosio/eos) specific optimizations are available to support building EOSIO smart contracts. This new toolchain is built around [Clang 7](https://github.com/eosio/llvm), which means that EOSIO.CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are not available or incomplete.

Expand All @@ -22,8 +22,8 @@ $ brew remove eosio.cdt
```
#### Debian Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.1/eosio.cdt_1.6.1-1_amd64.deb
$ sudo apt install ./eosio.cdt_1.6.1-1_amd64.deb
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.2/eosio.cdt_1.6.2-1_amd64.deb
$ sudo apt install ./eosio.cdt_1.6.2-1_amd64.deb
```
#### Debian Package Uninstall
```sh
Expand All @@ -32,8 +32,8 @@ $ sudo apt remove eosio.cdt

#### Fedora RPM Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.1/eosio.cdt-1.6.1-1.fedora-x86_64.rpm
$ sudo yum install ./eosio.cdt-1.6.1-1.fedora-x86_64.rpm
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.2/eosio.cdt-1.6.2-1.fedora-x86_64.rpm
$ sudo yum install ./eosio.cdt-1.6.2-1.fedora-x86_64.rpm
```

#### Fedora RPM Package Uninstall
Expand All @@ -43,8 +43,8 @@ $ sudo yum remove eosio.cdt

#### Centos RPM Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.1/eosio.cdt-1.6.1-1.centos-x86_64.rpm
$ sudo yum install ./eosio.cdt-1.6.1-1.centos-x86_64.rpm
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.2/eosio.cdt-1.6.2-1.centos-x86_64.rpm
$ sudo yum install ./eosio.cdt-1.6.2-1.centos-x86_64.rpm
```

#### Centos RPM Package Uninstall
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if [ -z "$CMAKE" ]; then
CMAKE=$( command -v cmake )
fi

"$CMAKE" -DCMAKE_INSTALL_PREFIX=/usr/local/eosio.cdt ../
"$CMAKE" ../
if [ $? -ne 0 ]; then
exit -1;
fi
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/generator-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ This will mark this `class` as being an `EOSIO` contract, this allows for namesp
#### [[eosio::on_notify("\<valid eosio account name\>::\<valid eosio action name\>")]]
```
[[eosio::on_notify("eosio.token::transfer")]]
void on_token_transfer(name from, name to, assert quantity, std::string memo) {
void on_token_transfer(name from, name to, asset quantity, std::string memo) {
do something on transfer from eosio.token...
}
[[eosio::on_notify("*::transfer")]]
void on_any_transfer(name from, name to, assert quantity, std::string memo) {
void on_any_transfer(name from, name to, asset quantity, std::string memo) {
do something on transfer from any account...
}
```
Expand Down
1 change: 1 addition & 0 deletions docs/tools/eosio-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ compiler options:
-fno-lto - Disable LTO
-fno-post-pass - Don't run post processing pass
-fno-stack-first - Don't set the stack first in memory
-stack-size - Specifies the maximum stack size for the contract
-fstack-protector - Enable stack protectors for functions potentially vulnerable to stack smashing
-fstack-protector-all - Force the usage of stack protectors for all functions
-fstack-protector-strong - Use a strong heuristic to apply stack protectors to functions
Expand Down
1 change: 1 addition & 0 deletions docs/tools/eosio-ld.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ld options:
-fno-lto - Disable LTO
-fno-post-pass - Don't run post processing pass
-fno-stack-first - Don't set the stack first in memory
-stack-size - Specifies the maximum stack size for the contract
-fuse-main - Use main as entry
-l=<string> - Root name of library to link
-lto-opt=<string> - LTO Optimization level (O0-O3)
Expand Down
2 changes: 1 addition & 1 deletion eosio_llvm
Submodule eosio_llvm updated 1 files
+1 −1 tools/lld
84 changes: 24 additions & 60 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,72 +31,36 @@
##########################################################################


CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "${CWD}" != "${PWD}" ]; then
printf "\\n\\tPlease cd into directory %s to run this script.\\n \\tExiting now.\\n\\n" "${CWD}"
exit 1
fi
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "${CWD}" != "${PWD}" ]; then
printf "\\n\\tPlease cd into directory %s to run this script.\\n \\tExiting now.\\n\\n" "${CWD}"
exit 1
fi

BUILD_DIR="${PWD}/build"
CMAKE_BUILD_TYPE=Release
TIME_BEGIN=$( date -u +%s )
BUILD_DIR="${PWD}/build"
CMAKE_BUILD_TYPE=Release
TIME_BEGIN=$( date -u +%s )
INSTALL_PREFIX="/usr/local/eosio.cdt"
VERSION=1.2
VERSION=1.2

txtbld=$(tput bold)
bldred=${txtbld}$(tput setaf 1)
txtrst=$(tput sgr0)

create_symlink() {
pushd /usr/local/bin &> /dev/null
ln -sf ../eosio.cdt/bin/$1 $2
popd &> /dev/null
}

install_symlinks() {
printf "\\n\\tInstalling EOSIO.CDT Binary Symlinks\\n\\n"
create_symlink "llvm-ranlib eosio-ranlib"
create_symlink "llvm-ar eosio-ar"
create_symlink "llvm-objdump eosio-objdump"
create_symlink "llvm-readelf eosio-readelf"
create_symlink "eosio-cc eosio-cc"
create_symlink "eosio-cpp eosio-cpp"
create_symlink "eosio-ld eosio-ld"
create_symlink "eosio-pp eosio-pp"
create_symlink "eosio-init eosio-init"
create_symlink "eosio-abigen eosio-abigen"
create_symlink "eosio-abidiff eosio-abidiff"
create_symlink "eosio-wasm2wast eosio-wasm2wast"
create_symlink "eosio-wast2wasm eosio-wast2wasm"
}
txtbld=$(tput bold)
bldred=${txtbld}$(tput setaf 1)
txtrst=$(tput sgr0)

create_cmake_symlink() {
mkdir -p /usr/local/lib/cmake/eosio.cdt
pushd /usr/local/lib/cmake/eosio.cdt &> /dev/null
ln -sf ../../../eosio.cdt/lib/cmake/eosio.cdt/$1 $1
popd &> /dev/null
}
if [ ! -d "${BUILD_DIR}" ]; then
if [ ! -d "${BUILD_DIR}" ]; then
printf "\\n\\tError, build.sh has not ran. Please run ./build.sh first!\\n\\n"
exit -1
fi

if ! pushd "${BUILD_DIR}"
then
printf "Unable to enter build directory %s.\\n Exiting now.\\n" "${BUILD_DIR}"
exit 1;
fi

if ! make install
then
printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.\\n\\n"
exit -1
fi
fi
if ! pushd "${BUILD_DIR}"; then
printf "Unable to enter build directory %s.\\n Exiting now.\\n" "${BUILD_DIR}"
exit 1;
fi
if ! make install; then
printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.\\n\\n"
exit -1
fi
popd &> /dev/null

install_symlinks
create_cmake_symlink "eosio.cdt-config.cmake"

printf "\n${bldred}\t ___ ___ ___ ___\n"
printf "\t / /\\ / /\\ / /\\ ___ / /\\ \n"
printf "\t / /:/_ / /::\\ / /:/_ / /\\ / /::\\ \n"
Expand All @@ -109,5 +73,5 @@
printf "\t \\ \\::/ \\ \\::/ /__/:/ \\__\\/ \\ \\::/ \n"
printf "\t \\__\\/ \\__\\/ \\__\\/ \\__\\/ \n${txtrst}"

printf "\\tFor more information:\\n"
printf "\\tEOSIO website: https://eos.io\\n"
printf "\\tFor more information:\\n"
printf "\\tEOSIO website: https://eos.io\\n"
6 changes: 6 additions & 0 deletions libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
project(eosio_libraries)

find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
message(STATUS "Using ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif()

list(APPEND CMAKE_MODULE_PATH ${EOSIO_CDT_BIN})
include(EosioCDTMacros)

Expand Down
10 changes: 8 additions & 2 deletions libraries/eosiolib/contracts/eosio/action.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ namespace eosio {
template <auto Action, typename... Ts>
constexpr bool type_check() {
static_assert(sizeof...(Ts) == std::tuple_size<deduced<Action>>::value);
return check_types<Action, 0, Ts...>::value;
if constexpr (sizeof...(Ts) != 0)
return check_types<Action, 0, Ts...>::value;
return true;
}

/// @endcond
Expand All @@ -425,7 +427,7 @@ namespace eosio {
* Example:
* @code
* // defined by contract writer of the actions
* using transfer act = action_wrapper<"transfer"_n, &token::transfer>;( *this, transfer, {st.issuer,N(active)}, {st.issuer, to, quantity, memo} );
* using transfer_act = action_wrapper<"transfer"_n, &token::transfer>;
* // usage by different contract writer
* transfer_act{"eosio.token"_n, {st.issuer, "active"_n}}.send(st.issuer, to, quantity, memo);
* // or
Expand All @@ -451,6 +453,10 @@ namespace eosio {
constexpr action_wrapper(Code&& code, const eosio::permission_level& perm)
: code_name(std::forward<Code>(code)), permissions({1, perm}) {}

template <typename Code>
constexpr action_wrapper(Code&& code)
: code_name(std::forward<Code>(code)) {}

static constexpr eosio::name action_name = eosio::name(Name);
eosio::name code_name;
std::vector<eosio::permission_level> permissions;
Expand Down
2 changes: 1 addition & 1 deletion libraries/eosiolib/contracts/eosio/multi_index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ namespace _multi_index_detail {
* uint64_t primary;
* uint128_t secondary;
* uint64_t primary_key() const { return primary; }
* uint64_t get_secondary() const { return secondary; }
* uint128_t get_secondary() const { return secondary; }
* };
* public:
* mycontract(name receiver, name code, datastream<const char*> ds):contract(receiver, code, ds){}
Expand Down
4 changes: 2 additions & 2 deletions libraries/eosiolib/contracts/eosio/permission.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace eosio {
check_transaction_authorization( const char* trx_data, uint32_t trx_size,
const char* pubkeys_data, uint32_t pubkeys_size,
const char* perms_data, uint32_t perms_size ) {
internal_use_do_not_use::check_transaction_authorization( trx_data, trx_size, pubkeys_data, pubkeys_size, perms_data, perms_size );
return internal_use_do_not_use::check_transaction_authorization( trx_data, trx_size, pubkeys_data, pubkeys_size, perms_data, perms_size );
}

/**
Expand All @@ -74,7 +74,7 @@ namespace eosio {
microseconds delay ) {
int64_t delay_us = delay.count();
check(delay_us >= 0, "negative delay is not allowed");
internal_use_do_not_use::check_permission_authorization( account.value, permission.value, pubkeys_data, pubkeys_size, perms_data, perms_size, static_cast<uint64_t>(delay_us) );
return internal_use_do_not_use::check_permission_authorization( account.value, permission.value, pubkeys_data, pubkeys_size, perms_data, perms_size, static_cast<uint64_t>(delay_us) );
}


Expand Down
2 changes: 1 addition & 1 deletion libraries/eosiolib/contracts/eosio/transaction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ namespace eosio {
* @param size - The size of the packed transaction, required for persistence.
* @param replace - If true, will replace an existing transaction.
*/
void send_deferred(const uint128_t& sender_id, name payer, const char* serialized_transaction, size_t size, bool replace = false) {
inline void send_deferred(const uint128_t& sender_id, name payer, const char* serialized_transaction, size_t size, bool replace = false) {
internal_use_do_not_use::send_deferred(sender_id, payer.value, serialized_transaction, size, replace);
}
/**
Expand Down
Loading

0 comments on commit 0255f84

Please sign in to comment.