
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
5 lines
30 B
C
5 lines
30 B
C
int foo(void)
|
|
{
|
|
return 0;
|
|
}
|