compiler_wrapper: strip newline char from resource dir.

The resource dir value returned by calling clang has a new line
character. This breaks running clang with
"-Xclang-path=/path/to/<clang_dir>" functionality as the resource
directory with this new line does not exist.

BUG=chromium:1044790
TEST=compilation with "-Xclang-path=/path/to/<clang_dir>" works.

Change-Id: I0ef31108719aed02a433aff3e751e961892dd15a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2017844
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
2 files changed