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

Commit 0255f84

Browse files
authored
Merge pull request #549 from EOSIO/bump_version
Release v1.6.2
2 parents 4985359 + ce5d7b5 commit 0255f84

22 files changed

+157
-117
lines changed

CMakeLists.txt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,18 @@ find_program(SCCACHE_FOUND sccache)
55
if (SCCACHE_FOUND)
66
message(STATUS "Using sccache")
77
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE sccache)
8-
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK sccache)
98
else()
109
find_program(CCACHE_FOUND ccache)
1110
if (CCACHE_FOUND)
1211
message(STATUS "Using ccache")
1312
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
14-
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
1513
endif()
1614
endif()
1715

1816

1917
set(VERSION_MAJOR 1)
2018
set(VERSION_MINOR 6)
21-
set(VERSION_PATCH 1)
19+
set(VERSION_PATCH 2)
2220
#set(VERSION_SUFFIX rc2)
2321

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

30-
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
31-
message(WARNING "CMAKE_INSTALL_PREFIX is set to default path of ${CMAKE_INSTALL_PREFIX}, resetting to ${CMAKE_INSTALL_PREFIX}/eosio.cdt")
32-
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/eosio.cdt")
33-
elseif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
34-
message(WARNING "CMAKE_INSTALL_PREFIX is explicitly set to /usr/local. This is not recommended.")
35-
endif()
28+
set(CDT_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/eosio.cdt)
3629

3730
include(GNUInstallDirs)
3831

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

50-
set(CDT_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
43+
set(CDT_ROOT_DIR ${CDT_INSTALL_PREFIX})
5144
configure_file(${CMAKE_SOURCE_DIR}/modules/eosio.cdt-config.cmake ${CMAKE_BINARY_DIR}/modules/eosio.cdt-config.cmake @ONLY)
5245
install(FILES ${CMAKE_BINARY_DIR}/modules/eosio.cdt-config.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/eosio.cdt)
5346
configure_file(${CMAKE_SOURCE_DIR}/modules/EosioCDTMacros.cmake.in ${CMAKE_BINARY_DIR}/modules/EosioCDTMacros.cmake @ONLY)
5447
configure_file(${CMAKE_SOURCE_DIR}/modules/EosioWasmToolchain.cmake.in ${CMAKE_BINARY_DIR}/modules/EosioWasmToolchain.cmake @ONLY)
5548
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioWasmToolchain.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/eosio.cdt)
56-
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioCDTMacros.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/eosio.cdt)
49+
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioCDTMacros.cmake DESTINATION ${CDT_INSTALL_PREFIX}/lib/cmake/eosio.cdt)
5750

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

6760
configure_file(${CMAKE_SOURCE_DIR}/imports/eosio.imports.in ${CMAKE_BINARY_DIR}/eosio.imports COPYONLY)
68-
install(FILES ${CMAKE_BINARY_DIR}/eosio.imports DESTINATION ${CMAKE_INSTALL_PREFIX})
61+
install(FILES ${CMAKE_BINARY_DIR}/eosio.imports DESTINATION ${CDT_INSTALL_PREFIX})
6962

7063
configure_file(${CMAKE_SOURCE_DIR}/scripts/ricardeos/ricardeos.py ${CMAKE_BINARY_DIR}/scripts/ricardeos.py COPYONLY)
71-
install(FILES ${CMAKE_BINARY_DIR}/scripts/ricardeos.py DESTINATION ${CMAKE_INSTALL_PREFIX}/scripts)
64+
install(FILES ${CMAKE_BINARY_DIR}/scripts/ricardeos.py DESTINATION ${CDT_INSTALL_PREFIX}/scripts)
7265

7366
# section for package construction
7467
set(VENDOR "block.one")

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# EOSIO.CDT (Contract Development Toolkit)
2-
## Version : 1.6.1
2+
## Version : 1.6.2
33

44
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.
55

@@ -22,8 +22,8 @@ $ brew remove eosio.cdt
2222
```
2323
#### Debian Package Install
2424
```sh
25-
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.1/eosio.cdt_1.6.1-1_amd64.deb
26-
$ sudo apt install ./eosio.cdt_1.6.1-1_amd64.deb
25+
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.2/eosio.cdt_1.6.2-1_amd64.deb
26+
$ sudo apt install ./eosio.cdt_1.6.2-1_amd64.deb
2727
```
2828
#### Debian Package Uninstall
2929
```sh
@@ -32,8 +32,8 @@ $ sudo apt remove eosio.cdt
3232

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

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

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

5050
#### Centos RPM Package Uninstall

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ if [ -z "$CMAKE" ]; then
9494
CMAKE=$( command -v cmake )
9595
fi
9696

97-
"$CMAKE" -DCMAKE_INSTALL_PREFIX=/usr/local/eosio.cdt ../
97+
"$CMAKE" ../
9898
if [ $? -ne 0 ]; then
9999
exit -1;
100100
fi

docs/guides/generator-attributes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ This will mark this `class` as being an `EOSIO` contract, this allows for namesp
5555
#### [[eosio::on_notify("\<valid eosio account name\>::\<valid eosio action name\>")]]
5656
```
5757
[[eosio::on_notify("eosio.token::transfer")]]
58-
void on_token_transfer(name from, name to, assert quantity, std::string memo) {
58+
void on_token_transfer(name from, name to, asset quantity, std::string memo) {
5959
do something on transfer from eosio.token...
6060
}
6161

6262
[[eosio::on_notify("*::transfer")]]
63-
void on_any_transfer(name from, name to, assert quantity, std::string memo) {
63+
void on_any_transfer(name from, name to, asset quantity, std::string memo) {
6464
do something on transfer from any account...
6565
}
6666
```

docs/tools/eosio-cpp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ compiler options:
5454
-fno-lto - Disable LTO
5555
-fno-post-pass - Don't run post processing pass
5656
-fno-stack-first - Don't set the stack first in memory
57+
-stack-size - Specifies the maximum stack size for the contract
5758
-fstack-protector - Enable stack protectors for functions potentially vulnerable to stack smashing
5859
-fstack-protector-all - Force the usage of stack protectors for all functions
5960
-fstack-protector-strong - Use a strong heuristic to apply stack protectors to functions

docs/tools/eosio-ld.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ld options:
2020
-fno-lto - Disable LTO
2121
-fno-post-pass - Don't run post processing pass
2222
-fno-stack-first - Don't set the stack first in memory
23+
-stack-size - Specifies the maximum stack size for the contract
2324
-fuse-main - Use main as entry
2425
-l=<string> - Root name of library to link
2526
-lto-opt=<string> - LTO Optimization level (O0-O3)

eosio_llvm

install.sh

Lines changed: 24 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -31,72 +31,36 @@
3131
##########################################################################
3232

3333

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

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

46-
txtbld=$(tput bold)
47-
bldred=${txtbld}$(tput setaf 1)
48-
txtrst=$(tput sgr0)
49-
50-
create_symlink() {
51-
pushd /usr/local/bin &> /dev/null
52-
ln -sf ../eosio.cdt/bin/$1 $2
53-
popd &> /dev/null
54-
}
55-
56-
install_symlinks() {
57-
printf "\\n\\tInstalling EOSIO.CDT Binary Symlinks\\n\\n"
58-
create_symlink "llvm-ranlib eosio-ranlib"
59-
create_symlink "llvm-ar eosio-ar"
60-
create_symlink "llvm-objdump eosio-objdump"
61-
create_symlink "llvm-readelf eosio-readelf"
62-
create_symlink "eosio-cc eosio-cc"
63-
create_symlink "eosio-cpp eosio-cpp"
64-
create_symlink "eosio-ld eosio-ld"
65-
create_symlink "eosio-pp eosio-pp"
66-
create_symlink "eosio-init eosio-init"
67-
create_symlink "eosio-abigen eosio-abigen"
68-
create_symlink "eosio-abidiff eosio-abidiff"
69-
create_symlink "eosio-wasm2wast eosio-wasm2wast"
70-
create_symlink "eosio-wast2wasm eosio-wast2wasm"
71-
}
46+
txtbld=$(tput bold)
47+
bldred=${txtbld}$(tput setaf 1)
48+
txtrst=$(tput sgr0)
7249

73-
create_cmake_symlink() {
74-
mkdir -p /usr/local/lib/cmake/eosio.cdt
75-
pushd /usr/local/lib/cmake/eosio.cdt &> /dev/null
76-
ln -sf ../../../eosio.cdt/lib/cmake/eosio.cdt/$1 $1
77-
popd &> /dev/null
78-
}
79-
if [ ! -d "${BUILD_DIR}" ]; then
50+
if [ ! -d "${BUILD_DIR}" ]; then
8051
printf "\\n\\tError, build.sh has not ran. Please run ./build.sh first!\\n\\n"
8152
exit -1
82-
fi
83-
84-
if ! pushd "${BUILD_DIR}"
85-
then
86-
printf "Unable to enter build directory %s.\\n Exiting now.\\n" "${BUILD_DIR}"
87-
exit 1;
88-
fi
89-
90-
if ! make install
91-
then
92-
printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.\\n\\n"
93-
exit -1
94-
fi
53+
fi
54+
if ! pushd "${BUILD_DIR}"; then
55+
printf "Unable to enter build directory %s.\\n Exiting now.\\n" "${BUILD_DIR}"
56+
exit 1;
57+
fi
58+
if ! make install; then
59+
printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.\\n\\n"
60+
exit -1
61+
fi
9562
popd &> /dev/null
9663

97-
install_symlinks
98-
create_cmake_symlink "eosio.cdt-config.cmake"
99-
10064
printf "\n${bldred}\t ___ ___ ___ ___\n"
10165
printf "\t / /\\ / /\\ / /\\ ___ / /\\ \n"
10266
printf "\t / /:/_ / /::\\ / /:/_ / /\\ / /::\\ \n"
@@ -109,5 +73,5 @@
10973
printf "\t \\ \\::/ \\ \\::/ /__/:/ \\__\\/ \\ \\::/ \n"
11074
printf "\t \\__\\/ \\__\\/ \\__\\/ \\__\\/ \n${txtrst}"
11175

112-
printf "\\tFor more information:\\n"
113-
printf "\\tEOSIO website: https://eos.io\\n"
76+
printf "\\tFor more information:\\n"
77+
printf "\\tEOSIO website: https://eos.io\\n"

libraries/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
project(eosio_libraries)
22

3+
find_program(CCACHE_FOUND ccache)
4+
if (CCACHE_FOUND)
5+
message(STATUS "Using ccache")
6+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
7+
endif()
8+
39
list(APPEND CMAKE_MODULE_PATH ${EOSIO_CDT_BIN})
410
include(EosioCDTMacros)
511

libraries/eosiolib/contracts/eosio/action.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,9 @@ namespace eosio {
412412
template <auto Action, typename... Ts>
413413
constexpr bool type_check() {
414414
static_assert(sizeof...(Ts) == std::tuple_size<deduced<Action>>::value);
415-
return check_types<Action, 0, Ts...>::value;
415+
if constexpr (sizeof...(Ts) != 0)
416+
return check_types<Action, 0, Ts...>::value;
417+
return true;
416418
}
417419

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

456+
template <typename Code>
457+
constexpr action_wrapper(Code&& code)
458+
: code_name(std::forward<Code>(code)) {}
459+
454460
static constexpr eosio::name action_name = eosio::name(Name);
455461
eosio::name code_name;
456462
std::vector<eosio::permission_level> permissions;

libraries/eosiolib/contracts/eosio/multi_index.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ namespace _multi_index_detail {
350350
* uint64_t primary;
351351
* uint128_t secondary;
352352
* uint64_t primary_key() const { return primary; }
353-
* uint64_t get_secondary() const { return secondary; }
353+
* uint128_t get_secondary() const { return secondary; }
354354
* };
355355
* public:
356356
* mycontract(name receiver, name code, datastream<const char*> ds):contract(receiver, code, ds){}

libraries/eosiolib/contracts/eosio/permission.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace eosio {
4949
check_transaction_authorization( const char* trx_data, uint32_t trx_size,
5050
const char* pubkeys_data, uint32_t pubkeys_size,
5151
const char* perms_data, uint32_t perms_size ) {
52-
internal_use_do_not_use::check_transaction_authorization( trx_data, trx_size, pubkeys_data, pubkeys_size, perms_data, perms_size );
52+
return internal_use_do_not_use::check_transaction_authorization( trx_data, trx_size, pubkeys_data, pubkeys_size, perms_data, perms_size );
5353
}
5454

5555
/**
@@ -74,7 +74,7 @@ namespace eosio {
7474
microseconds delay ) {
7575
int64_t delay_us = delay.count();
7676
check(delay_us >= 0, "negative delay is not allowed");
77-
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) );
77+
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) );
7878
}
7979

8080

libraries/eosiolib/contracts/eosio/transaction.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ namespace eosio {
172172
* @param size - The size of the packed transaction, required for persistence.
173173
* @param replace - If true, will replace an existing transaction.
174174
*/
175-
void send_deferred(const uint128_t& sender_id, name payer, const char* serialized_transaction, size_t size, bool replace = false) {
175+
inline void send_deferred(const uint128_t& sender_id, name payer, const char* serialized_transaction, size_t size, bool replace = false) {
176176
internal_use_do_not_use::send_deferred(sender_id, payer.value, serialized_transaction, size, replace);
177177
}
178178
/**

0 commit comments

Comments
 (0)