[PATCH] D19611: [CMake] [Darwin] Use libtool instead of ar && ranlib
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 28 13:20:19 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267930: [CMake] [Darwin] Use libtool instead of ar && ranlib (authored by cbieneman).
Changed prior to commit:
http://reviews.llvm.org/D19611?vs=55289&id=55474#toc
Repository:
rL LLVM
http://reviews.llvm.org/D19611
Files:
llvm/trunk/CMakeLists.txt
Index: llvm/trunk/CMakeLists.txt
===================================================================
--- llvm/trunk/CMakeLists.txt
+++ llvm/trunk/CMakeLists.txt
@@ -56,6 +56,21 @@
${cmake_3_0_LANGUAGES}
C CXX ASM)
+if(APPLE)
+ if(NOT CMAKE_LIBTOOL)
+ find_program(CMAKE_LIBTOOL NAMES libtool)
+ endif()
+ if(CMAKE_LIBTOOL)
+ set(CMAKE_LIBTOOL ${CMAKE_LIBTOOL} CACHE PATH "libtool executable")
+ message(STATUS "Found libtool - ${CMAKE_LIBTOOL}")
+ get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+ foreach(lang ${languages})
+ set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
+ "${CMAKE_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
+ endforeach()
+ endif()
+endif()
+
# The following only works with the Ninja generator in CMake >= 3.0.
set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
"Define the maximum number of concurrent compilation jobs.")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19611.55474.patch
Type: text/x-patch
Size: 903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160428/58e6cdb5/attachment.bin>
More information about the llvm-commits
mailing list