LINKER:SHELL: prefix no longer tolerates -Wl,
In CMake 3.30 and below, the following code:
cmake_minimum_required(VERSION 3.30)
project(Example C)
add_executable(main main.c)
target_link_options(main PRIVATE "LINKER:SHELL:-Wl,--as-needed")
produces a link line with just -Wl,--as-needed.
As of CMake 3.31.1, the link line gets -Wl,-Wl,--as-needed instead, and fails with /usr/bin/ld: unrecognized option '-Wl'.
Technically the new behavior is correct, and the example is wrong to include -Wl, after LINKER:, but this change in behavior was made without a policy.