From 375e6fdbbe398921de321216125765ba1917a325 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Wed, 19 Apr 2023 16:01:10 +0200 Subject: Link step: use linker dependency linker file Based on work done by @ben.boeckel (!8051) Fixes: #22217 --- Help/manual/cmake-variables.7.rst | 1 + Help/release/dev/use-linker-depfile.rst | 11 +++++++++++ Help/variable/CMAKE_LINK_DEPENDS_USE_LINKER.rst | 12 ++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 Help/release/dev/use-linker-depfile.rst create mode 100644 Help/variable/CMAKE_LINK_DEPENDS_USE_LINKER.rst (limited to 'Help') diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 34d2c50642..6241f7d95f 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -479,6 +479,7 @@ Variables that Control the Build /variable/CMAKE_LIBRARY_PATH_FLAG /variable/CMAKE_LINK_DEF_FILE_FLAG /variable/CMAKE_LINK_DEPENDS_NO_SHARED + /variable/CMAKE_LINK_DEPENDS_USE_LINKER /variable/CMAKE_LINK_GROUP_USING_FEATURE /variable/CMAKE_LINK_GROUP_USING_FEATURE_SUPPORTED /variable/CMAKE_LINK_INTERFACE_LIBRARIES diff --git a/Help/release/dev/use-linker-depfile.rst b/Help/release/dev/use-linker-depfile.rst new file mode 100644 index 0000000000..11237071f4 --- /dev/null +++ b/Help/release/dev/use-linker-depfile.rst @@ -0,0 +1,11 @@ +use-linker-depfile +------------------ + +* GNU (and GNU-compatible) linkers gained support for a ``--dependency-file`` + flag in GNU Binutils 2.35 and LLVM's LLD 12.0.0. The + :ref:`Makefile ` and :ref:`Ninja ` + generators will now add these flags so that files read by the linker will + cause a relink if they change (typically modified timestamps). + + This feature can be controlled by the variable + :variable:`CMAKE_LINK_DEPENDS_USE_LINKER`. diff --git a/Help/variable/CMAKE_LINK_DEPENDS_USE_LINKER.rst b/Help/variable/CMAKE_LINK_DEPENDS_USE_LINKER.rst new file mode 100644 index 0000000000..e1b37a59da --- /dev/null +++ b/Help/variable/CMAKE_LINK_DEPENDS_USE_LINKER.rst @@ -0,0 +1,12 @@ +CMAKE_LINK_DEPENDS_USE_LINKER +----------------------------- + +.. versionadded:: 3.27 + +For the :ref:`Makefile ` and +:ref:`Ninja ` generators, link dependencies are now, for a +selection of linkers, generated by the linker itself. By defining this +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. -- cgit v1.2.1