std.build.LibExeObjStep: better handle transitive deps

* no longer repeat -lc on the linker line redundantly
 * when using linkLibrary() with a static library, it will now also put
   the static library's static library dependencies on the linker line,
   recursively.
 * refactor out a common pattern to an addFlag function
7ea3937c5aAndrew Kelley committed on 1/20/2023, 11:58:31 PMparent74b72a7
1 file changedLine totals unavailable