Merge "Support for building/using llvm-rs-cc for Windows SDK." into honeycomb
diff --git a/Android.mk b/Android.mk
index adced9c..ec0a210 100644
--- a/Android.mk
+++ b/Android.mk
@@ -206,7 +206,11 @@
 LOCAL_STATIC_LIBRARIES :=	\
 	libclangDriver libslang
 
-LOCAL_LDLIBS := -ldl -lpthread
+ifeq ($(HOST_OS),windows)
+  LOCAL_LDLIBS := -limagehlp -lpsapi
+else
+  LOCAL_LDLIBS := -ldl -lpthread
+endif
 
 # For build RSCCOptions.inc from RSCCOptions.td
 intermediates := $(call local-intermediates-dir)
diff --git a/RSSpec.mk b/RSSpec.mk
index 5a99b94..f617014 100644
--- a/RSSpec.mk
+++ b/RSSpec.mk
@@ -14,7 +14,7 @@
 # limitations under the License.
 #
 LOCAL_PATH := $(call my-dir)
-RS_SPEC_GEN := $(HOST_OUT_EXECUTABLES)/rs-spec-gen$(HOST_EXECUTABLE_SUFFIX)
+RS_SPEC_GEN := $(BUILD_OUT_EXECUTABLES)/rs-spec-gen$(BUILD_EXECUTABLE_SUFFIX)
 
 define generate-rs-spec-inc
 @mkdir -p $(dir $@)