Do not crash in cmake_transform.py is a module has no 'libs'
Bug: 154151802
Test: build
Signed-off-by: Roman Kiryanov <rkir@google.com>
Merged-In: Iaa3b4bf253daac9e6b9755cb31bb63d51273ef38
Change-Id: I69ba2aba0d6215bb20b65d6c6ddb972b417ba0cd
diff --git a/cmake_transform.py b/cmake_transform.py
index 3583ec8..298e454 100644
--- a/cmake_transform.py
+++ b/cmake_transform.py
@@ -106,7 +106,7 @@
flags = [escape(d) for d in module['cflags'] if not d.startswith('-D')]
# Make sure we remove the lib prefix from all our dependencies.
- libs = [remove_lib_prefix(l) for l in module['libs']]
+ libs = [remove_lib_prefix(l) for l in module.get('libs', [])]
staticlibs = [remove_lib_prefix(l) for l in
module.get('staticlibs', [])
if l != "libandroidemu"]