[lldb] Rollback to using i386 for the watch simulator

I switched the watch simulator test from i386 to using x86_64, but
apparently that's not supported on the bots. Rollback to using i386 and
solve the original issue by passing the target, similar to what I did
in TestSimulatorPlatform.py.

GitOrigin-RevId: e3bb1c80fe68110f6362af0413c04cd77a05fbac
diff --git a/test/API/tools/lldb-server/TestAppleSimulatorOSType.py b/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
index 609c6b5..d25ac26 100644
--- a/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
+++ b/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
@@ -15,7 +15,7 @@
     # Number of stderr lines to read from the simctl output.
     READ_LINES = 10
 
-    def check_simulator_ostype(self, sdk, platform_name):
+    def check_simulator_ostype(self, sdk, platform_name, arch=platform.machine()):
         cmd = ['xcrun', 'simctl', 'list', '-j', 'devices']
         self.trace(' '.join(cmd))
         sim_devices_str = subprocess.check_output(cmd).decode("utf-8")
@@ -48,8 +48,16 @@
         self.assertIsNotNone(deviceUDID)
         exe_name = 'test_simulator_platform_{}'.format(platform_name)
         sdkroot = lldbutil.get_xcode_sdk_root(sdk)
-        self.build(dictionary={ 'EXE': exe_name, 'SDKROOT': sdkroot.strip(),
-                                'ARCH': platform.machine() })
+        vers = lldbutil.get_xcode_sdk_version(sdk)
+        triple = '-'.join([arch, 'apple', platform_name + vers, 'simulator'])
+        version_min = '-m{}-simulator-version-min={}'.format(platform_name, vers)
+        self.build(
+            dictionary={
+                'EXE': exe_name,
+                'SDKROOT': sdkroot.strip(),
+                'ARCH': arch,
+                'ARCH_CFLAGS': '-target {} {}'.format(triple, version_min),
+            })
         exe_path = self.getBuildArtifact(exe_name)
         cmd = [
             'xcrun', 'simctl', 'spawn', '-s', deviceUDID, exe_path,
@@ -132,4 +140,5 @@
     @skipIfRemote
     def test_simulator_ostype_watchos(self):
         self.check_simulator_ostype(sdk='watchsimulator',
-                                    platform_name='watchos')
+                                    platform_name='watchos',
+                                    arch='i386')