Merge "Updates for the new ckati drop"
diff --git a/Android.bp b/Android.bp
index 74da7c1..c6b6ee4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -246,6 +246,17 @@
 }
 
 toolchain_library {
+    name: "libwinpthread",
+    host_supported: true,
+    enabled: false,
+    target: {
+        windows: {
+            enabled: true
+        },
+    },
+}
+
+toolchain_library {
     name: "libgcov",
     defaults: ["linux_bionic_supported"],
     arch: {
diff --git a/cc/linker.go b/cc/linker.go
index 4619926..07d9aa8 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -156,6 +156,10 @@
 		}
 	}
 
+	if ctx.Os() == android.Windows {
+		deps.LateStaticLibs = append(deps.LateStaticLibs, "libwinpthread")
+	}
+
 	return deps
 }