am 5edef2e8: Merge "x86_64/x32: Avoid early fail on x32 or x86_64 build"

* commit '5edef2e84e3c0d7df5e16904111061016a02c95f':
  x86_64/x32: Avoid early fail on x32 or x86_64 build
diff --git a/host/include/llvm/Config/config.h b/host/include/llvm/Config/config.h
index 090f373..e6c59c6 100644
--- a/host/include/llvm/Config/config.h
+++ b/host/include/llvm/Config/config.h
@@ -455,13 +455,8 @@
 /* Define to 1 if you have the <sys/types.h> header file. */
 #define HAVE_SYS_TYPES_H 1
 
-/* Already defined in system/core/include/arch/darwin-x86/AndroidConfig.h */
-#if !defined(HAVE_SYS_UIO_H)
-
 /* Define to 1 if you have the <sys/uio.h> header file. */
-#define HAVE_SYS_UIO_H 1
-
-#endif
+/* #define HAVE_SYS_UIO_H 1 */
 
 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
 #define HAVE_SYS_WAIT_H 1
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp
index f091945..3003760 100644
--- a/lib/Target/ARM/ARMTargetMachine.cpp
+++ b/lib/Target/ARM/ARMTargetMachine.cpp
@@ -23,7 +23,7 @@
 #include "llvm/Transforms/Scalar.h"
 using namespace llvm;
 
-cl::opt<bool>
+static cl::opt<bool>
 EnableGlobalMerge("global-merge", cl::Hidden,
                   cl::desc("Enable global merge pass"),
                   cl::init(true));
diff --git a/tools/llvm-as/Android.mk b/tools/llvm-as/Android.mk
index 44f3d4f..e58868b 100644
--- a/tools/llvm-as/Android.mk
+++ b/tools/llvm-as/Android.mk
@@ -8,7 +8,12 @@
 LOCAL_MODULE := llvm-as
 LOCAL_MODULE_TAGS := optional
 LOCAL_SRC_FILES := $(llvm_as_SRC_FILES)
-LOCAL_LDLIBS += -lpthread -lm -ldl
+LOCAL_LDLIBS += -lm
+ifdef USE_MINGW
+LOCAL_LDLIBS += -limagehlp
+else
+LOCAL_LDLIBS += -lpthread -ldl
+endif
 
 REQUIRES_EH := 1
 REQUIRES_RTTI := 1