Cherry-pick 'Add Win Clang x86 builds.' to skqp/dev.

The tryjob Build-Win-Clang-x86-Debug is on the CQ, but the CLs to add
that tryjob and make it succeed have not yet been cherry-picked to
skqp/dev, so all CQ dry runs are failing. This CL cherry-picks the
necessary changes to skqp/dev. Also re-gen tasks.json.

Original description below.

-----

Add Win Clang x86 builds.

Enable /arch:SSE2 for Win x86 builds (both MSVC and Clang).

Change-Id: I0618e938b6542b60fae3947b7e0dcde22650ba54
Reviewed-On: https://skia-review.googlesource.com/56721
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-By: Mike Klein <mtklein@google.com>
Reviewed-on: https://skia-review.googlesource.com/117086
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index b255eba..25d9006 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -112,7 +112,9 @@
       "-mfpu=neon",
       "-mthumb",
     ]
-  } else if (current_cpu == "x86" && !is_win) {
+  } else if (current_cpu == "x86" && is_win) {
+    cflags += [ "/arch:SSE2" ]
+  } else if (current_cpu == "x86") {
     asmflags += [ "-m32" ]
     cflags += [
       "-m32",
diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn
index 76de226..e15c7e9 100644
--- a/gn/toolchain/BUILD.gn
+++ b/gn/toolchain/BUILD.gn
@@ -46,7 +46,14 @@
     env_setup = "cmd /c $win_sdk/bin/SetEnv.cmd /x86 && "
   }
 
+  cl_m32_flag = ""
   if (clang_win != "") {
+    if (target_cpu == "x86") {
+      # cl.exe knows implicitly by the choice of executable that it's targeting
+      # x86, but clang-cl.exe needs to be told when targeting non-host
+      # platforms. (All our builders are x86-64, so x86 is always non-host.)
+      cl_m32_flag = "-m32"
+    }
     cl = "$clang_win/bin/clang-cl.exe"
   } else {
     cl = "$bin/cl.exe"
@@ -75,7 +82,8 @@
     outputs = [
       "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
     ]
-    rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}"
+    rspfile_content =
+        "{{defines}} {{include_dirs}} {{cflags}} $cl_m32_flag {{cflags_c}}"
     description = "compile {{source}}"
   }
 
@@ -90,7 +98,8 @@
     outputs = [
       "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
     ]
-    rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}"
+    rspfile_content =
+        "{{defines}} {{include_dirs}} {{cflags}} $cl_m32_flag {{cflags_cc}}"
     description = "compile {{source}}"
   }
 
diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json
index c6c028c..485181b 100644
--- a/infra/bots/jobs.json
+++ b/infra/bots/jobs.json
@@ -74,6 +74,8 @@
   "Build-Mac-Clang-x86_64-Release-CommandBuffer",
   "Build-Mac-Clang-x86_64-Release-TSAN",
   "Build-Win-Clang-arm64-Release-Android",
+  "Build-Win-Clang-x86-Debug",
+  "Build-Win-Clang-x86-Release",
   "Build-Win-Clang-x86_64-Debug",
   "Build-Win-Clang-x86_64-Debug-ANGLE",
   "Build-Win-Clang-x86_64-Debug-ANGLE_Goma",
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index 5841357..fa8b078 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -455,6 +455,18 @@
         "Build-Win-Clang-arm64-Release-Android"
       ]
     },
+    "Build-Win-Clang-x86-Debug": {
+      "priority": 0.8,
+      "tasks": [
+        "Build-Win-Clang-x86-Debug"
+      ]
+    },
+    "Build-Win-Clang-x86-Release": {
+      "priority": 0.8,
+      "tasks": [
+        "Build-Win-Clang-x86-Release"
+      ]
+    },
     "Build-Win-Clang-x86_64-Debug": {
       "priority": 0.8,
       "tasks": [
@@ -5255,6 +5267,74 @@
       "isolate": "compile_skia.isolate",
       "priority": 0.8
     },
+    "Build-Win-Clang-x86-Debug": {
+      "cipd_packages": [
+        {
+          "name": "skia/bots/clang_win",
+          "path": "clang_win",
+          "version": "version:2"
+        }
+      ],
+      "dependencies": [
+        "Housekeeper-PerCommit-IsolateWinToolchain"
+      ],
+      "dimensions": [
+        "cpu:x86-64-Haswell_GCE",
+        "gpu:none",
+        "machine_type:n1-highcpu-64",
+        "os:Windows-2016Server-14393",
+        "pool:Skia"
+      ],
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "compile",
+        "repository=<(REPO)",
+        "buildername=Build-Win-Clang-x86-Debug",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
+      ],
+      "isolate": "compile_skia.isolate",
+      "priority": 0.8
+    },
+    "Build-Win-Clang-x86-Release": {
+      "cipd_packages": [
+        {
+          "name": "skia/bots/clang_win",
+          "path": "clang_win",
+          "version": "version:2"
+        }
+      ],
+      "dependencies": [
+        "Housekeeper-PerCommit-IsolateWinToolchain"
+      ],
+      "dimensions": [
+        "cpu:x86-64-Haswell_GCE",
+        "gpu:none",
+        "machine_type:n1-highcpu-64",
+        "os:Windows-2016Server-14393",
+        "pool:Skia"
+      ],
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "compile",
+        "repository=<(REPO)",
+        "buildername=Build-Win-Clang-x86-Release",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
+      ],
+      "isolate": "compile_skia.isolate",
+      "priority": 0.8
+    },
     "Build-Win-Clang-x86_64-Debug": {
       "cipd_packages": [
         {