aboutsummaryrefslogtreecommitdiffstats
path: root/lllc
diff options
context:
space:
mode:
authorMatthew Halpern <matt.halpern@consensys.net>2018-01-16 23:16:14 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-02-13 18:20:43 +0800
commitda36c82a0a3fd7c1c55b959f5db68260d00a3a94 (patch)
tree31c3a1abeb0ea672bd2eec69f3b6f699308ddc19 /lllc
parentf8810ef9e8891fb198eb213e4b32374d11ae4bbd (diff)
downloaddexon-solidity-da36c82a0a3fd7c1c55b959f5db68260d00a3a94.tar
dexon-solidity-da36c82a0a3fd7c1c55b959f5db68260d00a3a94.tar.gz
dexon-solidity-da36c82a0a3fd7c1c55b959f5db68260d00a3a94.tar.bz2
dexon-solidity-da36c82a0a3fd7c1c55b959f5db68260d00a3a94.tar.lz
dexon-solidity-da36c82a0a3fd7c1c55b959f5db68260d00a3a94.tar.xz
dexon-solidity-da36c82a0a3fd7c1c55b959f5db68260d00a3a94.tar.zst
dexon-solidity-da36c82a0a3fd7c1c55b959f5db68260d00a3a94.zip
Allow lllc to be installed
Diffstat (limited to 'lllc')
-rw-r--r--lllc/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/lllc/CMakeLists.txt b/lllc/CMakeLists.txt
index 7bebd0b1..5c480093 100644
--- a/lllc/CMakeLists.txt
+++ b/lllc/CMakeLists.txt
@@ -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()