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

Commit 4985359

Browse files
authored
Merge pull request #465 from EOSIO/release/1.6.x
Release/1.6.x
2 parents 603b757 + ab4fc3c commit 4985359

File tree

5 files changed

+31
-10
lines changed

5 files changed

+31
-10
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif()
1818

1919
set(VERSION_MAJOR 1)
2020
set(VERSION_MINOR 6)
21-
set(VERSION_PATCH 0)
21+
set(VERSION_PATCH 1)
2222
#set(VERSION_SUFFIX rc2)
2323

2424
if (VERSION_SUFFIX)

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# EOSIO.CDT (Contract Development Toolkit)
2-
## Version : 1.6.0
2+
## Version : 1.6.1
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.0/eosio.cdt_1.6.0-1_amd64.deb
26-
$ sudo apt install ./eosio.cdt_1.6.0-1_amd64.deb
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
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.0/eosio.cdt-1.6.0-1.fedora-x86_64.rpm
36-
$ sudo yum install ./eosio.cdt-1.6.0-1.fedora-x86_64.rpm
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
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.0/eosio.cdt-1.6.0-1.centos-x86_64.rpm
47-
$ sudo yum install ./eosio.cdt-1.6.0-1.centos-x86_64.rpm
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
4848
```
4949

5050
#### Centos RPM Package Uninstall

eosio_llvm

tools/include/compiler_options.hpp.in

+3-1
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ static void GetCompDefaults(std::vector<std::string>& copts) {
356356
if (!fnative_opt) {
357357
copts.emplace_back("--target=wasm32");
358358
copts.emplace_back("-ffreestanding");
359+
copts.emplace_back("-nostdlib");
360+
copts.emplace_back("-fno-builtin");
359361
} else {
360362
copts.emplace_back("-Wunused-command-line-argument");
361363
#ifdef __APPLE__
@@ -377,8 +379,8 @@ static void GetCompDefaults(std::vector<std::string>& copts) {
377379
if (!fasm_opt) {
378380
copts.emplace_back("-fno-threadsafe-statics");
379381
#ifdef CPP_COMP
380-
copts.emplace_back("-fno-rtti");
381382
copts.emplace_back("-fno-exceptions");
383+
copts.emplace_back("-fno-rtti");
382384
copts.emplace_back("-fmodules-ts");
383385
#endif
384386
copts.emplace_back("-DBOOST_DISABLE_ASSERTS");

tools/include/eosio/codegen.hpp

+19
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,12 @@ namespace eosio { namespace cdt {
149149
StringRef main_name;
150150
Rewriter rewriter;
151151
CompilerInstance* ci;
152+
bool apply_was_found = false;
152153

153154
public:
155+
std::vector<CXXMethodDecl*> action_decls;
156+
std::vector<CXXMethodDecl*> notify_decls;
157+
154158
explicit eosio_codegen_visitor(CompilerInstance *CI)
155159
: generation_utils([&](){throw cg.codegen_ex;}), ci(CI) {
156160
cg.ast_context = &(CI->getASTContext());
@@ -351,6 +355,15 @@ namespace eosio { namespace cdt {
351355
//cg.cxx_methods.emplace(name, decl);
352356
return true;
353357
}
358+
359+
virtual bool VisitDecl(clang::Decl* decl) {
360+
if (auto* fd = dyn_cast<clang::FunctionDecl>(decl)) {
361+
if (fd->getNameInfo().getAsString() == "apply")
362+
apply_was_found = true;
363+
}
364+
return true;
365+
}
366+
354367
/*
355368
virtual bool VisitRecordDecl(RecordDecl* decl) {
356369
static std::set<std::string> _action_set; //used for validations
@@ -401,6 +414,12 @@ namespace eosio { namespace cdt {
401414
visitor->set_main_fid(fid);
402415
visitor->set_main_name(main_fe->getName());
403416
visitor->TraverseDecl(Context.getTranslationUnitDecl());
417+
for (auto ad : visitor->action_decls)
418+
visitor->create_action_dispatch(ad);
419+
420+
for (auto nd : visitor->notify_decls)
421+
visitor->create_notify_dispatch(nd);
422+
404423
int fd;
405424
llvm::SmallString<128> fn;
406425
try {

0 commit comments

Comments
 (0)