stdout, stderr = p.communicate()
return p.returncode, stdout, stderr
+def append_android_envs(dictionary):
+ if dictionary is None:
+ dictionary = {}
+ dictionary["OS"] = "Android"
+ if android_device_api() >= 16:
+ dictionary["PIE"] = 1
+ return dictionary
+
def target_is_android():
if not hasattr(target_is_android, 'result'):
triple = lldb.DBG.GetSelectedPlatform().GetTriple()
if lldb.skip_build_and_cleanup:
return
module = builder_module()
+ if target_is_android():
+ dictionary = append_android_envs(dictionary)
if not module.buildDefault(self, architecture, compiler, dictionary, clean):
raise Exception("Don't know how to build default binary")
return
module = builder_module()
if target_is_android():
- if dictionary is None:
- dictionary = {}
- dictionary["OS"] = "Android"
- if android_device_api() >= 16:
- dictionary["PIE"] = 1
+ dictionary = append_android_envs(dictionary)
if not module.buildDwarf(self, architecture, compiler, dictionary, clean):
raise Exception("Don't know how to build binary with dwarf")