CMake/Tests/RunCMake/LinkWhatYouUse/foo.c
Đoàn Trần Công Danh 93eb4a7bd1 Ninja: Revert accidental LINK_WHAT_YOU_USE impl for static libraries
In commit d7159f9591, (Ninja: Fix LINK_WHAT_YOU_USE link flag placement,
2021-06-24), we fixed usage of -Wl,--no-as-needed to override
-Wl,--as-needed from LDFLAGS. However, that change also passes
-Wl,--no-as-needed to `ar`, which is incorrect flag for `ar`.

Let's check the target type before passing down the flags.

Fixes: #22487
2021-08-03 11:21:26 -04:00

5 lines
30 B
C