Allow lllc to be installed

This commit is contained in:
Matthew Halpern 2018-01-16 10:16:14 -05:00 committed by Alex Beregszaszi
parent f8810ef9e8
commit da36c82a0a
3 changed files with 21 additions and 0 deletions

View File

@ -12,6 +12,8 @@ set(PROJECT_VERSION "0.4.20")
project(solidity VERSION ${PROJECT_VERSION})
option(SOLC_LINK_STATIC "Link solc executable statically on supported platforms" OFF)
option(LLLC_LINK_STATIC "Link lllc executable statically on supported platforms" OFF)
option(INSTALL_LLLC "Include lllc executable in installation" ON)
# Setup cccache.
include(EthCcache)

View File

@ -1,3 +1,19 @@
add_executable(lllc main.cpp)
target_link_libraries(lllc PRIVATE lll)
if (INSTALL_LLLC)
include(GNUInstallDirs)
install(TARGETS lllc DESTINATION ${CMAKE_INSTALL_BINDIR})
if(LLLC_LINK_STATIC AND UNIX AND NOT APPLE)
# Produce lllc as statically linked binary (includes C/C++ standard libraries)
# This is not supported on macOS, see
# https://developer.apple.com/library/content/qa/qa1118/_index.html.
set_target_properties(
lllc PROPERTIES
LINK_FLAGS -static
LINK_SEARCH_START_STATIC ON
LINK_SEARCH_END_STATIC ON
)
endif()
endif()

View File

@ -166,6 +166,9 @@ override_dh_auto_test:
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
override_dh_auto_configure:
dh_auto_configure -- -DINSTALL_LLLC=Off
EOF
cat <<EOF > debian/copyright
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/