targets/host: reduce win_incompatible_config

- Mingw64 10.2.0 builds pw_sync and pw_thread successfully.
- Continues to leave thread sleep disabled on Windows, but
  removes all other win_incompatible_config options.

No-Docs-Update-Reason: gni cleanup
Change-Id: I0c684652ae3a462f34d71c264cf637f1d98c0300
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/43021
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Reviewed-by: Anthony DiGirolamo <tonymd@google.com>
diff --git a/pw_thread_stl/BUILD.gn b/pw_thread_stl/BUILD.gn
index 37ccf9b..637d2c6 100644
--- a/pw_thread_stl/BUILD.gn
+++ b/pw_thread_stl/BUILD.gn
@@ -110,7 +110,8 @@
 }
 
 pw_test("thread_backend_test") {
-  enable_if = pw_thread_THREAD_BACKEND == "$dir_pw_thread_stl:thread"
+  enable_if = pw_thread_THREAD_BACKEND == "$dir_pw_thread_stl:thread" &&
+              pw_thread_SLEEP_BACKEND != ""
   deps = [
     ":test_threads",
     "$dir_pw_thread:thread_facade_test",
diff --git a/targets/host/target_toolchains.gni b/targets/host/target_toolchains.gni
index 07b769a..8980c45 100644
--- a/targets/host/target_toolchains.gni
+++ b/targets/host/target_toolchains.gni
@@ -38,6 +38,11 @@
 
   # Configure backends for pw_sync's facades.
   pw_sync_INTERRUPT_SPIN_LOCK_BACKEND = "$dir_pw_sync_stl:interrupt_spin_lock"
+  pw_sync_BINARY_SEMAPHORE_BACKEND = "$dir_pw_sync_stl:binary_semaphore_backend"
+  pw_sync_COUNTING_SEMAPHORE_BACKEND =
+      "$dir_pw_sync_stl:counting_semaphore_backend"
+  pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
+  pw_sync_TIMED_MUTEX_BACKEND = "$dir_pw_sync_stl:timed_mutex_backend"
 
   # Configure backend for pw_sys_io facade.
   pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio"
@@ -54,6 +59,11 @@
   # Configure backend for pw_chrono's system_clock facade.
   pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
 
+  # Configure backends for pw_thread's facades.
+  pw_thread_ID_BACKEND = "$dir_pw_thread_stl:id"
+  pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
+  pw_thread_THREAD_BACKEND = "$dir_pw_thread_stl:thread"
+
   # Specify builtin GN variables.
   current_os = host_os
   current_cpu = host_cpu
@@ -79,21 +89,10 @@
   pw_unit_test_AUTOMATIC_RUNNER = get_path_info("run_test.bat", "abspath")
 }
 
-# TODO(amontanez): figure out why std::mutex doesn't work on Windows.
-# These current target configurations do not work on windows.
+# TODO(ewout): figure out why MingGW's sleep doesn't work correctly or provide
+# a wrapper which sleeps until our contract is met.
 _win_incompatible_config = {
-  # Configure backends for pw_sync's facades.
-  pw_sync_BINARY_SEMAPHORE_BACKEND = "$dir_pw_sync_stl:binary_semaphore_backend"
-  pw_sync_COUNTING_SEMAPHORE_BACKEND =
-      "$dir_pw_sync_stl:counting_semaphore_backend"
-  pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
-  pw_sync_TIMED_MUTEX_BACKEND = "$dir_pw_sync_stl:timed_mutex_backend"
-
-  # Configure backends for pw_thread's facades.
-  pw_thread_ID_BACKEND = "$dir_pw_thread_stl:id"
   pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep"
-  pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
-  pw_thread_THREAD_BACKEND = "$dir_pw_thread_stl:thread"
 }
 
 _os_specific_config = {