link dependencies: deactivate the feature

Unfortunately it breaks in combination with LTO due to a bug in the GNU
linker.

Fixes: #25014
This commit is contained in:
Marc Chevrier
2023-06-23 14:36:55 +02:00
committed by Brad King
parent 99ea9ad947
commit 5945a98ced
4 changed files with 22 additions and 6 deletions
@@ -10,3 +10,11 @@ variable with value ``FALSE``, you can deactivate this feature.
This feature is also deactivated if the :prop_tgt:`LINK_DEPENDS_NO_SHARED`
target property is true.
.. note::
CMake version |release| defaults this variable to ``FALSE`` because
GNU binutils linkers (``ld``, ``ld.bfd``, ``ld.gold``) generate spurious
dependencies on temporary files when LTO is enabled. See `GNU bug 30568`_.
.. _`GNU bug 30568`: https://sourceware.org/bugzilla/show_bug.cgi?id=30568