Don't force -pie for Android.

Summary:
There is no -no-pie flag that can override this, so making it default
to being on for Android means it is no longer possible to create
non-PIE executables on Android. While current versions of Android
support (and the most recent requires) PIE, ICS and earlier versions
of Android cannot run PIE executables, so this needs to be optional.

Reviewers: srhines

Reviewed By: srhines

Subscribers: thakis, volkalexey, cfe-commits

Differential Revision: http://reviews.llvm.org/D8015

llvm-svn: 231091
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 17b430c..5d66605 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -7576,11 +7576,7 @@
   const bool IsPIE =
     !Args.hasArg(options::OPT_shared) &&
     !Args.hasArg(options::OPT_static) &&
-    (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault() ||
-     // On Android every code is PIC so every executable is PIE
-     // Cannot use isPIEDefault here since otherwise
-     // PIE only logic will be enabled during compilation
-     isAndroid);
+    (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault());
 
   ArgStringList CmdArgs;