Merge branch 'release-4.0'
[kiteware-cmake.git] / Modules / Linker / GNUgold.cmake
blob4680564880214d049f7789bae8ea2126788e8ed1
1 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2 # file Copyright.txt or https://cmake.org/licensing for details.
5 # This module is shared by multiple linkers; use include blocker.
6 include_guard()
8 include(Linker/GNU)
10 macro(__linker_gnugold lang)
11   __linker_gnu(${lang})
13   # Due to GNU binutils ld bug when LTO is enabled (see GNU bug
14   # `30568 <https://sourceware.org/bugzilla/show_bug.cgi?id=30568>`_),
15   # deactivate this feature because all known versions of gold linker have
16   # this bug.
17   set(CMAKE_${lang}_LINK_DEPENDS_USE_LINKER FALSE)
18 endmacro()