GN get_label_info support toolchains for target_out_dir.

Previously get_label_info would return directories that used the current toolchain's root build directory. This would return an incorrect result if a caller manually specifies a toolchain in the label to resolve.

This patch adds a variant of the GetTargetOutputDir function that takes the necessary information, and changes the old signatures to use the new more complicated one as the underlying call.

Adds some unit tests for this and related cases in the get_label_info tests.

Updates some tests tests. The above changes exposed some cases where the toolchain was not being set up properly in the test. This additionally caused the toolchain prefixes to be missing from the tool names in the Windows PCH tests. The tests are now updated with the correct toolchain setup and expected output. This was a bug in the tests only.

BUG=524587

Review URL: https://codereview.chromium.org/1316653003

Cr-Original-Commit-Position: refs/heads/master@{#345485}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6aeaa45ae77e50206032691bdedebffdc42f73d8
6 files changed
tree: a9643e07f293c709e43433b0345cf78a162d8710
  1. tools/