gn2bp: support '//' in label_to_path
Test: ./gen_android_bp --desc gn.json --output Android.bp \ '//third_party/zlib:zlib' Change-Id: I65eb857440cb67a7774c120f619cbec86c10d73d
This commit is contained in:
@@ -150,7 +150,7 @@ def compute_source_dependencies(out, system_buildtools=False):
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user