Don't override default AR and RANLIB without LTO
`ar` is not always available, and when it is, it's not always correct, e.g. during cross-compilation. https://bugs.gentoo.org/732096
This commit is contained in:
parent
a184b39013
commit
60564a959a
1 changed files with 0 additions and 6 deletions
|
@ -421,12 +421,6 @@ if(ENABLE_LTO)
|
|||
find_program(LTO_RANLIB NAMES gcc-ranlib)
|
||||
set(CMAKE_AR "${LTO_AR}" CACHE STRING "Supports LTO" FORCE)
|
||||
set(CMAKE_RANLIB "${LTO_RANLIB}" CACHE STRING "Supports LTO" FORCE)
|
||||
else()
|
||||
MESSAGE("Using ar, ranlib, and default linker")
|
||||
find_program(NON_LTO_AR NAMES ar)
|
||||
find_program(NON_LTO_RANLIB NAMES ranlib)
|
||||
set(CMAKE_AR "${NON_LTO_AR}" CACHE STRING "Does not support LTO" FORCE)
|
||||
set(CMAKE_RANLIB "${NON_LTO_RANLIB}" CACHE STRING "Does not support LTO" FORCE)
|
||||
endif()
|
||||
MARK_AS_ADVANCED(LTO_AR LTO_RANLIB NON_LTO_AR NON_LTO_RANLIB)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue