gn2bp: support '//' in label_to_path
Test: ./gen_android_bp --desc gn.json --output Android.bp \
'//third_party/zlib:zlib'
Change-Id: I65eb857440cb67a7774c120f619cbec86c10d73d
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index 7b54213..95f677a 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -150,7 +150,7 @@
def label_to_path(label):
"""Turn a GN output label (e.g., //some_dir/file.cc) into a path."""
assert label.startswith('//')
- return label[2:]
+ return label[2:] or "./"
def label_without_toolchain(label):