linker: fix build-obj and -fno-emit-bin

This commit fixes two problems:

* `zig build-obj` regressed from the cache-mode branch. It would crash
  because it assumed that dirname on the emit bin path would not be
  null. This assumption was invalid when outputting to the current
  working directory - a pretty common use case for `zig build-obj`.

* When using the LLVM backend, `-fno-emit-bin` combined with any other
  kind of emitting, such as `-femit-asm`, emitted nothing.

Both issues are now fixed.
ff66a18555Andrew Kelley committed on 1/4/2022, 3:03:22 AMparent81fa31c
7 files changedLine totals unavailable