Feature request: Support order-only dependencies
Why is this necessary
Link order matters when using static libraries, on some extended features like weak symbols or symbol wrapping (ld --wrap
) highly depend on "existing" (left side) vs "pending" (right side) symbols.
An example is the Xenomai::posix
target from Xenomai CMake, this works by renaming existing symbols like sleep
to __wrap_sleep
, but later libraries/sources will define the real sleep
function (and therefore must come after the ld directive the Xenomai::posix
target defines).
Now the basic issue is, that Xenomai::posix
will need to list all libraries that could be affected, even if the application is not requiring all of them (adding an unecessary dependency).
If the application depends on a library that is affected, it needs to be ensured it is added after Xenomai::posix
in the commandline.
Some way to specify this order without adding a real dependency would be required.