mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 22:43:19 +00:00
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
@ -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…
x
Reference in New Issue
Block a user