[Lldb-commits] [PATCH] D11317: Apply Android -pie switch to buildDefault as well.
Chaoren Lin
chaorenl at google.com
Fri Jul 17 17:38:11 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL242598: Apply Android -pie switch to buildDefault as well. (authored by chaoren).
Changed prior to commit:
http://reviews.llvm.org/D11317?vs=30052&id=30058#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11317
Files:
lldb/trunk/test/lldbtest.py
Index: lldb/trunk/test/lldbtest.py
===================================================================
--- lldb/trunk/test/lldbtest.py
+++ lldb/trunk/test/lldbtest.py
@@ -431,6 +431,14 @@
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()
@@ -1974,6 +1982,8 @@
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")
@@ -1991,11 +2001,7 @@
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")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11317.30058.patch
Type: text/x-patch
Size: 1514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150718/e757686b/attachment.bin>
More information about the lldb-commits
mailing list