Force debug info output into Swift modules

* This makes sure that all swiftmodule artifacts contain debug information needed for LLDB to recreate the module at runtime.

--
PiperOrigin-RevId: 143685225
MOS_MIGRATED_REVID=143685225
diff --git a/tools/build_defs/apple/swift.bzl b/tools/build_defs/apple/swift.bzl
index 5837c3f..d4c3e8b 100644
--- a/tools/build_defs/apple/swift.bzl
+++ b/tools/build_defs/apple/swift.bzl
@@ -49,10 +49,12 @@
   mode = ctx.var["COMPILATION_MODE"]
 
   flags = []
-  if mode == "dbg":
-    flags += ["-Onone", "-DDEBUG", "-enable-testing"]
-  elif mode == "fastbuild":
-    flags += ["-Onone", "-DDEBUG", "-enable-testing"]
+  if mode == "dbg" or mode == "fastbuild":
+    # TODO(dmishe): Find a way to test -serialize-debugging-options
+    flags += [
+        "-Onone", "-DDEBUG", "-enable-testing", "-Xfrontend",
+        "-serialize-debugging-options"
+    ]
   elif mode == "opt":
     flags += ["-O", "-DNDEBUG"]