forked from EOSIO/eosio.cdt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
InstallClang.txt
56 lines (51 loc) · 3.05 KB
/
InstallClang.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
add_custom_command( TARGET EosioClang POST_BUILD COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin )
macro( eosio_clang_install file )
set(BINARY_DIR ${CMAKE_BINARY_DIR}/EosioClang-prefix/src/EosioClang-build/bin)
add_custom_command( TARGET EosioClang POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${file} ${CMAKE_BINARY_DIR}/bin/ )
install(FILES ${BINARY_DIR}/${file}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endmacro( eosio_clang_install )
macro( eosio_clang_install_and_symlink file symlink )
set(BINARY_DIR ${CMAKE_BINARY_DIR}/EosioClang-prefix/src/EosioClang-build/bin)
add_custom_command( TARGET EosioClang POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${file} ${CMAKE_BINARY_DIR}/bin/ )
add_custom_command( TARGET EosioClang POST_BUILD COMMAND cd ${CMAKE_BINARY_DIR}/bin && ln -sf ${file} ${symlink} )
install(FILES ${BINARY_DIR}/${file}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endmacro( eosio_clang_install_and_symlink )
macro( eosio_tool_install file )
set(BINARY_DIR ${CMAKE_BINARY_DIR}/EosioTools-prefix/src/EosioTools-build/bin)
add_custom_command( TARGET EosioTools POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${file} ${CMAKE_BINARY_DIR}/bin/ )
install(FILES ${BINARY_DIR}/${file}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endmacro( eosio_tool_install )
macro( eosio_tool_install_and_symlink file symlink )
set(BINARY_DIR ${CMAKE_BINARY_DIR}/EosioTools-prefix/src/EosioTools-build/bin)
add_custom_command( TARGET EosioTools POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${file} ${CMAKE_BINARY_DIR}/bin/ )
add_custom_command( TARGET EosioTools POST_BUILD COMMAND cd ${CMAKE_BINARY_DIR}/bin && ln -sf ${file} ${symlink} )
install(FILES ${BINARY_DIR}/${file}
DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endmacro( eosio_tool_install_and_symlink )
eosio_clang_install_and_symlink(llvm-ranlib eosio-ranlib)
eosio_clang_install_and_symlink(llvm-ar eosio-ar)
eosio_clang_install_and_symlink(llvm-nm eosio-nm)
eosio_clang_install_and_symlink(llvm-objcopy eosio-objcopy)
eosio_clang_install_and_symlink(llvm-objdump eosio-objdump)
eosio_clang_install_and_symlink(llvm-readobj eosio-readobj)
eosio_clang_install_and_symlink(llvm-readelf eosio-readelf)
eosio_clang_install_and_symlink(llvm-strip eosio-strip)
eosio_clang_install(opt)
eosio_clang_install(llc)
eosio_clang_install(lld)
eosio_clang_install(clang-7)
eosio_clang_install(wasm-ld)
eosio_tool_install(eosio-cc)
eosio_tool_install(eosio-cpp)
eosio_tool_install(eosio-ld)
eosio_tool_install(eosio-abigen)
eosio_tool_install(eosio-abidiff)
eosio_clang_install(../lib/LLVMEosioApply${CMAKE_SHARED_LIBRARY_SUFFIX})
eosio_clang_install(../lib/eosio_plugin${CMAKE_SHARED_LIBRARY_SUFFIX})