Skip to content

Commit

Permalink
Merge pull request EOSIO#271 from EOSIO/release/1.4.x
Browse files Browse the repository at this point in the history
Release Version 1.4.1
  • Loading branch information
larryk85 authored Nov 14, 2018
2 parents 94c517c + 2313da6 commit 6f14991
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(eosio_cdt)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 4)
set(VERSION_PATCH 0)
set(VERSION_PATCH 1)

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")
Expand Down
4 changes: 2 additions & 2 deletions InstallClang.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endmacro( eosio_clang_install )
macro( eosio_clang_install_and_symlink file symlink )
set(BINARY_DIR ${CMAKE_BINARY_DIR}/EosioClang-prefix/src/EosioClang-build/bin)
add_custom_command( TARGET EosioClang POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${file} ${CMAKE_BINARY_DIR}/bin/ )
add_custom_command( TARGET EosioClang POST_BUILD COMMAND ln -sf ${CMAKE_BINARY_DIR}/bin/${file} ${CMAKE_BINARY_DIR}/bin/${symlink} )
add_custom_command( TARGET EosioClang POST_BUILD COMMAND cd ${CMAKE_BINARY_DIR}/bin && ln -sf ${file} ${symlink} )
install(FILES ${BINARY_DIR}/${file}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
Expand All @@ -27,7 +27,7 @@ endmacro( eosio_tool_install )
macro( eosio_tool_install_and_symlink file symlink )
set(BINARY_DIR ${CMAKE_BINARY_DIR}/EosioTools-prefix/src/EosioTools-build/bin)
add_custom_command( TARGET EosioTools POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${file} ${CMAKE_BINARY_DIR}/bin/ )
add_custom_command( TARGET EosioTools POST_BUILD COMMAND ln -sf ${CMAKE_BINARY_DIR}/bin/${file} ${CMAKE_BINARY_DIR}/bin/${symlink} )
add_custom_command( TARGET EosioTools POST_BUILD COMMAND cd ${CMAKE_BINARY_DIR}/bin && ln -sf ${file} ${symlink} )
install(FILES ${BINARY_DIR}/${file}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
Expand Down
25 changes: 18 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.4.0
## Version : 1.4.1

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,21 +22,32 @@ $ brew remove eosio.cdt
```
#### Debian Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.4.0/eosio.cdt-1.4.0.x86_64.deb
$ sudo apt install ./eosio.cdt-1.4.0.x86_64.deb
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.4.1/eosio.cdt-1.4.1.x86_64.deb
$ sudo apt install ./eosio.cdt-1.4.1.x86_64.deb
```
#### Debian Package Uninstall
```sh
$ sudo apt remove eosio.cdt
```

#### RPM Package Install
#### Fedora RPM Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.4.0/eosio.cdt-1.4.0.x86_64-0.x86_64.rpm
$ sudo yum install ./eosio.cdt-1.4.0.x86_64-0.x86_64.rpm
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.4.1/eosio.cdt-fedora-1.4.1.x86_64-0.x86_64.rpm
$ sudo yum install ./eosio.cdt-fedora-1.4.1.x86_64-0.x86_64.rpm
```

#### RPM Package Uninstall
#### Fedora RPM Package Uninstall
```sh
$ sudo yum remove eosio.cdt
```

#### Centos RPM Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.4.1/eosio.cdt-centos-1.4.1.x86_64-0.x86_64.rpm
$ sudo yum install ./eosio.cdt-centos-1.4.1.x86_64-0.x86_64.rpm
```

#### Centos RPM Package Uninstall
```sh
$ sudo yum remove eosio.cdt
```
Expand Down
2 changes: 1 addition & 1 deletion libraries/eosiolib/fixed_key.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace eosio {
const size_t sub_word_shift = 8 * sizeof(Word);
const size_t num_sub_words = sizeof(word_t) / sizeof(Word);
auto sub_words_left = num_sub_words;
for( Word w_itr = arr_begin; w_itr != arr_end; ++w_itr ) {
for( auto w_itr = arr_begin; w_itr != arr_end; ++w_itr ) {
if( sub_words_left > 1 ) {
temp_word |= static_cast<word_t>(*w_itr);
temp_word <<= sub_word_shift;
Expand Down
19 changes: 13 additions & 6 deletions libraries/eosiolib/multi_index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ struct secondary_index_db_functions<TYPE> {\
#define MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(TYPE)\
template<>\
struct secondary_key_traits<TYPE> {\
static constexpr TYPE lowest() { return std::numeric_limits<TYPE>::lowest(); }\
static_assert( std::numeric_limits<TYPE>::is_specialized, "TYPE does not have specialized numeric_limits" );\
static constexpr TYPE true_lowest() { return std::numeric_limits<TYPE>::lowest(); }\
};

namespace _multi_index_detail {
Expand All @@ -132,21 +133,27 @@ namespace _multi_index_detail {
MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(uint128_t)

WRAP_SECONDARY_SIMPLE_TYPE(idx_double, double)
MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(double)
template<>
struct secondary_key_traits<double> {
static constexpr double true_lowest() { return -std::numeric_limits<double>::infinity(); }
};

WRAP_SECONDARY_SIMPLE_TYPE(idx_long_double, long double)
MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(long double)
template<>
struct secondary_key_traits<long double> {
static constexpr long double true_lowest() { return -std::numeric_limits<long double>::infinity(); }
};

WRAP_SECONDARY_ARRAY_TYPE(idx256, eosio::key256)
template<>
struct secondary_key_traits<eosio::key256> {
static constexpr eosio::key256 lowest() { return eosio::key256(); }
static constexpr eosio::key256 true_lowest() { return eosio::key256(); }
};

WRAP_SECONDARY_ARRAY_TYPE(idx256, eosio::fixed_bytes<32>)
template<>
struct secondary_key_traits<eosio::fixed_bytes<32>> {
static constexpr eosio::fixed_bytes<32> lowest() { return eosio::fixed_bytes<32>(); }
static constexpr eosio::fixed_bytes<32> true_lowest() { return eosio::fixed_bytes<32>(); }
};

}
Expand Down Expand Up @@ -419,7 +426,7 @@ class multi_index

const_iterator cbegin()const {
using namespace _multi_index_detail;
return lower_bound( secondary_key_traits<secondary_key_type>::lowest() );
return lower_bound( secondary_key_traits<secondary_key_type>::true_lowest() );
}
const_iterator begin()const { return cbegin(); }

Expand Down
3 changes: 2 additions & 1 deletion libraries/eosiolib/name.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,6 @@ namespace eosio {
*/
template <typename T, T... Str>
inline constexpr eosio::name operator""_n() {
return eosio::name{std::string_view{eosio::detail::to_const_char_arr<Str...>::value, sizeof...(Str)}};
constexpr auto x = eosio::name{std::string_view{eosio::detail::to_const_char_arr<Str...>::value, sizeof...(Str)}};
return x;
}
7 changes: 3 additions & 4 deletions modules/EosioWasmToolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_CROSSCOMPILING 1)
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(CMAKE_CXX_STANDARD 17)

set(EOSIO_CDT_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@")
set(EOSIO_WASMSDK_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@")

set(CMAKE_C_COMPILER "@CDT_ROOT_DIR@/bin/eosio-cc")
set(CMAKE_CXX_COMPILER "@CDT_ROOT_DIR@/bin/eosio-cpp")
set(CMAKE_C_COMPILER "@CDT_ROOT_DIR@/bin/eosio-cc" CACHE PATH "cc" FORCE)
set(CMAKE_CXX_COMPILER "@CDT_ROOT_DIR@/bin/eosio-cpp" CACHE PATH "cxx" FORCE)

set(CMAKE_C_FLAGS " -O3 ")
set(CMAKE_CXX_FLAGS " -O3 ")
Expand Down Expand Up @@ -37,7 +37,6 @@ include_directories(
macro(add_contract CONTRACT_NAME TARGET)
add_executable( ${TARGET}.wasm ${ARGN} )
target_compile_options( ${TARGET}.wasm PUBLIC -abigen )
set_target_properties( ${TARGET}.wasm PROPERTIES LINKER_LANGUAGE C )
get_target_property(BINOUTPUT ${TARGET}.wasm BINARY_DIR)
target_compile_options( ${TARGET}.wasm PUBLIC -abigen_output=${BINOUTPUT}/${TARGET}.abi )
target_compile_options( ${TARGET}.wasm PUBLIC -contract ${CONTRACT_NAME} )
Expand Down
16 changes: 14 additions & 2 deletions scripts/generate_bottle.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#! /bin/bash

NAME="${PROJECT}-${VERSION}.high_sierra.bottle.tar.gz"
VERS=`sw_vers -productVersion | awk '/10\.13\..*/{print $0}'`
if [[ -z "$VERS" ]];
then
VERS=`sw_vers -productVersion | awk '/10\.14.*/{print $0}'`
if [[ -z "$VERS" ]];
then
echo "Error, unsupported OS X version"
exit -1
fi
MAC_VERSION="mojave"
else
MAC_VERSION="high_sierra"
fi

mkdir -p ${PROJECT}/${VERSION}/opt/eosio_cdt/lib/cmake

Expand Down Expand Up @@ -42,7 +54,7 @@ echo "class EosioCdt < Formula
bottle do
root_url \"https://github.com/eosio/eosio.cdt/releases/download/v${VERSION}\"
sha256 \"${hash}\" => :high_sierra
sha256 \"${hash}\" => :${MAC_VERSION}
end
def install
raise \"Error, only supporting binary packages at this time\"
Expand Down

0 comments on commit 6f14991

Please sign in to comment.