diff options
author | Chaoren Lin <chaorenl@google.com> | 2015-07-18 00:37:55 +0000 |
---|---|---|
committer | Chaoren Lin <chaorenl@google.com> | 2015-07-18 00:37:55 +0000 |
commit | e9bbabcc69dd3b6a5f9629635ceb0968bd43f44d (patch) | |
tree | 490c6d749cb927acbbe3f3bc7015ca12511958a8 | |
parent | 86e4a3e0a39e5cb18f592e4de91b4c96c17b41f6 (diff) | |
download | bcm5719-llvm-e9bbabcc69dd3b6a5f9629635ceb0968bd43f44d.tar.gz bcm5719-llvm-e9bbabcc69dd3b6a5f9629635ceb0968bd43f44d.zip |
Apply Android -pie switch to buildDefault as well.
Reviewers: ovyalov
Subscribers: tberghammer, danalbert, srhines, lldb-commits
Differential Revision: http://reviews.llvm.org/D11317
llvm-svn: 242598
-rw-r--r-- | lldb/test/lldbtest.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index 288dd11953e..cdd3a6f66b3 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -431,6 +431,14 @@ def run_adb_command(cmd, device_id): 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 @@ class Base(unittest2.TestCase): 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 @@ class Base(unittest2.TestCase): 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") |