Expose the NDK STLs to make.

Without this any module exposed to make that uses an NDK STL will
have unsatisfied dependencies.

Test: make native
Bug: None
Change-Id: Ia456cdc230d5ebf5e1256ab131ab78248b790bc8
diff --git a/cc/androidmk.go b/cc/androidmk.go
index 1db5373..efd4ee7 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -372,3 +372,14 @@
 		fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem)
 	})
 }
+
+func (c *ndkPrebuiltStlLinker) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
+	ret.Class = "SHARED_LIBRARIES"
+
+	ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
+		// Prevent make from installing the libraries to obj/lib (since we have
+		// dozens of libraries with the same name, they'll clobber each other
+		// and the real versions of the libraries from the platform).
+		fmt.Fprintln(w, "LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES := false")
+	})
+}
diff --git a/cc/ndk_prebuilt.go b/cc/ndk_prebuilt.go
index 13424e3..69e07b9 100644
--- a/cc/ndk_prebuilt.go
+++ b/cc/ndk_prebuilt.go
@@ -141,7 +141,10 @@
 	module.compiler = nil
 	module.linker = linker
 	module.installer = nil
-	module.Properties.HideFromMake = true
+	minVersionString := "minimum"
+	noStlString := "none"
+	module.Properties.Sdk_version = &minVersionString
+	module.stl.Properties.Stl = &noStlString
 	return module.Init()
 }