Set -ffile-reproducible for Windows builds

By default, Clang uses the build environment's platform-specific path
separator when expanding the __FILE__ macro. This can cause
non-determinism between Windows builds built on Windows vs Linux.
https://reviews.llvm.org/D122766 added the flag -ffile-reproducible
which uses the target's platform-specific path separator regardless of
the build environment.

Cq-Include-Trybots: chromium/try:dawn-win10-x86-deps-rel
Cq-Include-Trybots: chromium/try:win-asan,win7-rel
Cq-Include-Trybots: chromium/try:win-official,win32-official
Cq-Include-Trybots: chromium/try:win-swangle-try-x86
Cq-Include-Trybots: chrome/try:win-chrome,win64-chrome
Cq-Include-Trybots: chrome/try:win32-pgo,win64-pgo
Bug: 1280678,1310767
Change-Id: I6921628e3437d021674d6d60ea844e1a5144e7d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3664098
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Alan Zhao <ayzhao@google.com>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1007715}
NOKEYCHECK=True
GitOrigin-RevId: 8bf3275ba280b177468159ff865b265f6c55567d
diff --git a/win/BUILD.gn b/win/BUILD.gn
index 3a6dc1e..abde4a9 100644
--- a/win/BUILD.gn
+++ b/win/BUILD.gn
@@ -71,7 +71,14 @@
   ]
 
   if (is_clang) {
-    cflags += [ "/Zc:twoPhase" ]
+    cflags += [
+      "/Zc:twoPhase",
+
+      # Consistently use backslash as the path separator when expanding the
+      # __FILE__ macro when targeting Windows regardless of the build
+      # environment.
+      "-ffile-reproducible",
+    ]
   }
 
   # Force C/C++ mode for the given GN detected file type. This is necessary