[ndk][arm] Use vreg while lowering tMOVCCr_pseudo.

The Thumb1 backend is lowering tMOVCCr_pseudo by splitting
the basic blocks and select different variables with phi
instruction.  However, the physical registers can't be used
across the machine basic blocks. Otherwise, there will be
some compile-time fatal error and some run-time incorrect
behavior.

This CL implements a simple live variable analysis to
analyze the usage of physical registers among the splitted
machine basic blocks, so that we can promote them to virtual
registers.

Change-Id: Id9352324e513224b5fb0746543d966934c4ffbdb
[ndk] Fix build error on GCC/Clang + STLport.

* Add missing #include <cctype> since STLport has different
  implementation that <cctype> won't be included indirectly.

* Add missing cast from enum value to unsigned int. Otherwise
  GCC 4.6 will bump a compile error w/ -pedantic flag.

Conflicts:

	lib/Archive/ArchiveReader.cpp
	lib/Object/COFFObjectFile.cpp
	lib/Target/PowerPC/PPCRegisterInfo.cpp
	tools/bugpoint/CrashDebugger.cpp
	unittests/Support/IntegersSubsetTest.cpp

Change-Id: I61fac1230f0b79b5227033cae69f80bf162ce607
[ndk][arm] Conditional compile fenv.h for NDK headers.

NDK armeabi default use -msoft-float, and it cannot truely use
fenv.h since it has vmrs,vmsr inline asm.

Change-Id: If49045f2bfed0f33f7dc9156d5eea3bda89ad90a
[ndk] Patch for canadian cross build via NDK standalone.

Change-Id: I03ef83aa8b9e22d62f83a3059efd5152059cbbce
[ndk][pndk] Add ndk triple for Android bitcode.

Change-Id: I1b09d34632e59997402b034e7e652998ef8a8faa
[ndk][x86] Add option to store sp cookie in var.

Add an option to store the stack protector cookie
in the global variable.

Change-Id: Ieb4293c58efe88eac7fdb79b684947c3ee0b8d00
[ndk] Add -disable-global-ctor-const-promotion option.

The global variable optimization will try to evaluate the
constant global variable and remove the constructors.

However, some legacy code will try to perform const_cast<>()
and assign to the "constant" to avoid static initialization
order fiasco.  To workaround those old code, this commit
adds a new option to disable the promotion of the global
constant with constructors.

Change-Id: If5146f1ebc9139008b5899cd474c5f57aef0697a
[ndk][pndk] Import Wrap library for bitcode wrapper.

source:
https://android.googlesource.com/platform/frameworks/compile/libbcc/
commit: 25b7205e16e422469da74f88e74ad79e7c284ac7

libbcc/bcinfo
libbcc/include/bcinfo

Change-Id: Ic2f237e3f3bc408348f4de07b7ebf1e32b8cbaaa

Conflicts:
	lib/Makefile
[ndk][pndk] Add 2 tags in LLVMWrap.

* kAndroidBitcodeType
  Generate this bitcode for shared object or executable.

* kAndroidLDFlags
  Store linker flags for this bitcode.

Change-Id: Icb29b5b2ed963e997df847e9f48539da0759963a
[ndk][pndk] Bitcode link tool for le32-none-ndk triple.

Changes compared with the original patch:

1. Remove the use of PathV1.

2. Move lib/Archive/* to tools/le32-none-ndk-link/
Will use lib/Object to read archives in the future.

Change-Id: Id75acdf96704733de5edb2ee85992cab3a62fa69
Author: Lai Wei-Chih <Robert.Lai@mediatek.com>;
Author: WenHan Gu <Wenhan.gu@mediatek.com>;
Author: Logan Chien <loganchien@google.com>;

Conflicts:
	tools/Makefile
[ndk][pndk] Bitcode strip tool for le32-none-ndk triple.

Changes compared with the original patch:

raw_fd_ostream::F_Binary -> sys::fs::F_Binary

Change-Id: I5ba61f062dcb709f40dab048c59acd9a0cf29c35

Conflicts:
	tools/Makefile
[ndk][pndk] Bitcode translation tool for le32-none-ndk triple.

Changes compared with the original patch:

  raw_fd_ostream::F_Binary -> sys::fs::F_Binary

Change-Id: I0cd8d576f4c0031972d007800359a494e60e9ce3

Conflicts:
	tools/Makefile
[ndk][pndk] Script for bitcode to native binaries.

 Author: Lai Wei-Chih <Robert.Lai@mediatek.com>
 Author: WenHan Gu <Wenhan.gu@mediatek.com>
 Author: Andrew Hsieh <andrewhsieh@google.com>

Change-Id: I8c1baa1c175318d533d47c424831a493d7bcb872
Accept but ignore -rpath-link=

Change-Id: Ie055ec1890350cd65cd496fe6416031a1248efb0