[compiler-rt] Disable ranlib when using libtool
libtool already produces a table of contents, and ranlib just gives spurious errors because it doesn't understand universal binaries. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D86365
This commit is contained in:
parent
68bae34c65
commit
26c1d689ae
|
@ -34,6 +34,14 @@ if(CMAKE_LIBTOOL)
|
||||||
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
|
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
|
||||||
"\"${CMAKE_LIBTOOL}\" -static ${LIBTOOL_NO_WARNING_FLAG} -o <TARGET> <LINK_FLAGS> <OBJECTS>")
|
"\"${CMAKE_LIBTOOL}\" -static ${LIBTOOL_NO_WARNING_FLAG} -o <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
# By default, CMake invokes ranlib on a static library after installing it.
|
||||||
|
# libtool will have produced the table of contents for us already, and ranlib
|
||||||
|
# does not understanding universal binaries, so skip this step. It's important
|
||||||
|
# to set it to empty instead of unsetting it to shadow the cache variable, and
|
||||||
|
# we don't want to unset the cache variable to not affect anything outside
|
||||||
|
# this scope.
|
||||||
|
set(CMAKE_RANLIB "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If DYLD_LIBRARY_PATH is set we need to set it on archiver commands
|
# If DYLD_LIBRARY_PATH is set we need to set it on archiver commands
|
||||||
|
|
Loading…
Reference in New Issue