[GN] Add support to rebase_path to resolve paths above the source root.

Currently, rebase_path clips any path which references the filesystem
above or outside of the source root. Extend this functionality to allow
rebase_path to properly resolve paths outside the source root when the
absolute path to the source root is known. When the source root is
unknown, the behavior will continue to clip.

BUG=554241
TEST=gn_unittests

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

Cr-Original-Commit-Position: refs/heads/master@{#363080}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 910ac443ab1827eae049ae052af867d432ad7aac
6 files changed
tree: 9bbc94687d38e0a94f2e21c7db44469fdb857bb2
  1. tools/