diff options
author | 2015-11-11 17:24:14 +0000 | |
---|---|---|
committer | 2015-11-12 09:00:15 +0000 | |
commit | d4c953f1a987ecde294a586c5c09955d87473100 (patch) | |
tree | 1c0ed4a5fd30c5e43f41c93412a2d96d8582385d /src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java | |
parent | 3c0af3d90df4e8c3dc1ae8ac2189adb4a019a129 (diff) |
C++ libraries in remote repos don't need to set include paths
Fixes #445, based on https://github.com/bazelbuild/bazel/compare/master...ulfjack:cpp-include-path.
RELNOTES: C++ libraries no longer need includes = ["."] (or similar copts) to include paths relative to a remote repository's root.
--
MOS_MIGRATED_REVID=107593486
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java b/src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java index 434cdcfc2c..97221abf6f 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java @@ -379,6 +379,9 @@ public final class PathFragment implements Comparable<PathFragment>, Serializabl * with no path normalization or I/O performed. */ public PathFragment getRelative(PathFragment otherFragment) { + if (otherFragment == EMPTY_FRAGMENT) { + return this; + } return otherFragment.isAbsolute() ? otherFragment : new PathFragment(this, otherFragment); |