Windows build coersions.

This commit is contained in:
Gav Wood 2014-07-03 15:00:22 +02:00
parent 6731576311
commit f4c99cdbb9
3 changed files with 18 additions and 8 deletions

View File

@ -7,7 +7,11 @@ aux_source_directory(. SRC_LIST)
set(EXECUTABLE lll)
# set(CMAKE_INSTALL_PREFIX ../lib)
add_library(${EXECUTABLE} SHARED ${SRC_LIST})
if(ETH_STATIC)
add_library(${EXECUTABLE} STATIC ${SRC_LIST})
else()
add_library(${EXECUTABLE} SHARED ${SRC_LIST})
endif()
file(GLOB HEADERS "*.h")
@ -15,7 +19,6 @@ include_directories(..)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} ethential)
target_link_libraries(${EXECUTABLE} gmp)
if(${TARGET_PLATFORM} STREQUAL "w64")

View File

@ -84,7 +84,11 @@ std::string eth::compileLLLToAsm(std::string const& _src, bool _opt, std::vector
string eth::parseLLL(string const& _src)
{
sp::utree o;
parseTreeLLL(_src, o);
try
{
parseTreeLLL(_src, o);
}
catch (...) {}
ostringstream ret;
debugOutAST(ret, o);
killBigints(o);

View File

@ -21,6 +21,8 @@
#include "Parser.h"
#define BOOST_RESULT_OF_USE_DECLTYPE
#define BOOST_SPIRIT_USE_PHOENIX_V3
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include <boost/spirit/include/support_utree.hpp>
@ -93,12 +95,13 @@ void eth::parseTreeLLL(string const& _s, sp::utree& o_out)
qi::rule<it, qi::ascii::space_type, sp::utree::list_type()> list = '(' > *element > ')';
// todo: fix compound compile errors in this line for Visual Studio 2013
#ifndef _MSC_VER
qi::rule<it, qi::ascii::space_type, sp::utree()> extra = sload[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 2)] | mload[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 1)] | sstore[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 4)] | mstore[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 3)] | seq[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 5)];
//#ifndef _MSC_VER
auto x = [](int a) { return [=](sp::utree& n, typename qi::rule<it, qi::ascii::space_type, sp::utree()>::context_type& c) { (boost::fusion::at_c<0>(c.attributes) = n).tag(a); }; };
qi::rule<it, qi::ascii::space_type, sp::utree()> extra = mload[x(1)] | sload[x(2)] | mstore[x(3)] | sstore[x(4)] | seq[x(5)];
element = atom | list | extra;
#else
element = atom | list/* | extra*/;
#endif
/*#else
element = atom | list;
#endif*/
string s;