mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
f713e907c2
llvm-lib is intended to be a lib.exe compatible utility that also understands bitcode. The implementation lives in a library so that lld can use it to implement /lib. Differential Revision: http://reviews.llvm.org/D10297 llvm-svn: 239434
32 lines
858 B
CMake
32 lines
858 B
CMake
# We need to execute this script at installation time because the
|
|
# DESTDIR environment variable may be unset at configuration time.
|
|
# See PR8397.
|
|
|
|
if(UNIX)
|
|
set(LINK_OR_COPY create_symlink)
|
|
set(DESTDIR $ENV{DESTDIR})
|
|
else()
|
|
set(LINK_OR_COPY copy)
|
|
endif()
|
|
|
|
# CMAKE_EXECUTABLE_SUFFIX is undefined on cmake scripts. See PR9286.
|
|
if( WIN32 )
|
|
set(EXECUTABLE_SUFFIX ".exe")
|
|
else()
|
|
set(EXECUTABLE_SUFFIX "")
|
|
endif()
|
|
|
|
set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/")
|
|
|
|
message("Creating llvm-ranlib")
|
|
|
|
execute_process(
|
|
COMMAND "${CMAKE_COMMAND}" -E ${LINK_OR_COPY} "llvm-ar${EXECUTABLE_SUFFIX}" "llvm-ranlib${EXECUTABLE_SUFFIX}"
|
|
WORKING_DIRECTORY "${bindir}")
|
|
|
|
message("Creating llvm-lib")
|
|
|
|
execute_process(
|
|
COMMAND "${CMAKE_COMMAND}" -E ${LINK_OR_COPY} "llvm-ar${EXECUTABLE_SUFFIX}" "llvm-lib${EXECUTABLE_SUFFIX}"
|
|
WORKING_DIRECTORY "${bindir}")
|