Merge pull request #51615 from enumatech/solc-0.5.1

solc: 0.5.0 -> 0.5.1
This commit is contained in:
adisbladis 2018-12-06 11:19:15 +00:00 committed by GitHub
commit 12457c77f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 13 deletions

View file

@ -1,9 +1,9 @@
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, z3 }:
let
version = "0.5.0";
rev = "1d4f565a64988a3400847d2655ca24f73f234bc6";
sha256 = "0phzk2whvgrrf8xpl5pz886glhd5s40y1hbbvq9q3fxf6vc3lisy";
version = "0.5.1";
rev = "c8a2cb62832afb2dc09ccee6fd42c1516dfdb981";
sha256 = "0d6mfnixlr9m5yr3r4p6cv6vwrrivcamyar5d0f9rvir9w9ypzrr";
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz;
jsoncpp = fetchzip {
url = jsoncppURL;
@ -28,11 +28,6 @@ stdenv.mkDerivation {
echo >commit_hash.txt "${rev}"
substituteInPlace cmake/jsoncpp.cmake \
--replace "${jsoncppURL}" ${jsoncpp}
# To allow non-standard CMAKE_INSTALL_LIBDIR (fixed in upstream, not yet released)
substituteInPlace cmake/jsoncpp.cmake \
--replace "\''${CMAKE_INSTALL_LIBDIR}" "lib" \
--replace "# Build static lib but suitable to be included in a shared lib." "-DCMAKE_INSTALL_LIBDIR=lib"
'';
cmakeFlags = [
@ -42,7 +37,7 @@ stdenv.mkDerivation {
];
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform;
checkPhase = "LD_LIBRARY_PATH=./libsolc:./libsolidity:./liblll:./libevmasm:./libdevcore:$LD_LIBRARY_PATH " +
checkPhase = "LD_LIBRARY_PATH=./libsolc:./libsolidity:./liblll:./libevmasm:./libdevcore:./libyul:./liblangutil:$LD_LIBRARY_PATH " +
"./test/soltest -p -- --no-ipc --no-smt --testpath ../test";
nativeBuildInputs = [ cmake ];
@ -56,7 +51,7 @@ stdenv.mkDerivation {
homepage = https://github.com/ethereum/solidity;
license = licenses.gpl3;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ dbrock akru ];
maintainers = with maintainers; [ dbrock akru lionello ];
inherit version;
};
}

View file

@ -2,11 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c05208f..8893648e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,20 @@ add_subdirectory(libevmasm)
@@ -48,6 +48,25 @@ add_subdirectory(libevmasm)
add_subdirectory(libsolidity)
add_subdirectory(libsolc)
+
+install(DIRECTORY libdevcore/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libdevcore
+ FILES_MATCHING PATTERN "*.h")
@ -16,6 +15,12 @@ index 0c05208f..8893648e 100644
+install(DIRECTORY libsolidity/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libsolidity
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY libyul/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libyul
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY liblangutil/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liblangutil
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY liblll/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liblll
+ FILES_MATCHING PATTERN "*.h")
@ -57,8 +62,23 @@ index 0bdec4b4..e876177e 100644
@@ -29,6 +29,7 @@ endif()
add_library(solidity ${sources} ${headers})
target_link_libraries(solidity PUBLIC evmasm devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
target_link_libraries(solidity PUBLIC yul evmasm langutil devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+install(TARGETS solidity LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if (${Z3_FOUND})
target_link_libraries(solidity PUBLIC ${Z3_LIBRARY})
--- a/libyul/CMakeLists.txt
+++ b/libyul/CMakeLists.txt
@@ -42,3 +42,4 @@ endif()
optimiser/VarDeclPropagator.cpp
)
-target_link_libraries(yul PUBLIC devcore)
+target_link_libraries(yul PUBLIC evmasm devcore langutil)
+install(TARGETS yul LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
--- a/liblangutil/CMakeLists.txt
+++ b/liblangutil/CMakeLists.txt
@@ -11,3 +11,4 @@ endif()
add_library(langutil ${sources})
target_link_libraries(langutil PUBLIC devcore)
+install(TARGETS langutil LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})