compiler_wrapper: pre-buffer stdin properly.

This CL makes our compiler wrapper pre-buffer all stdin when clang is
expected to depend on it. Otherwise, clang might not read all of the
stdin it's given, so future invocations of clang will only be handed
partial stdin.

BUG=chromium:1052532
TEST=emerged the kernel; sdk tryjob

Change-Id: I6660e6333a1e8cf4649ef38de5c91d0b700fe1b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2080852
Tested-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Tiancong Wang <tcwang@google.com>
4 files changed