dawn_native GN: copy FXC DLL when building d3d11/12 in standalone

With Rafael's recent changes, we now expect to load the FXC DLL from the
output directory, not the system one, so we make sure to copy it when
building dawn_native.

Fixes dawn.node failing to load FXC when, for e.g., running with d3d11
backend.

Bug: 448635122
Change-Id: I53841668be14b622efa7a5d0e5308eb5571c4f9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/264734
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
diff --git a/src/dawn/native/BUILD.gn b/src/dawn/native/BUILD.gn
index 1c44d14..1f1138a 100644
--- a/src/dawn/native/BUILD.gn
+++ b/src/dawn/native/BUILD.gn
@@ -164,6 +164,11 @@
   ]
 }
 
+if (dawn_standalone && (dawn_enable_d3d11 || dawn_enable_d3d12)) {
+  # Use ANGLE's target as it's always available in standalone builds
+  _copy_fxc_dll_target = "//third_party/angle:copy_compiler_dll"
+}
+
 # The meat of the compilation for dawn native so that we can cheaply have
 # shared_library / static_library versions of it. It compiles all the files
 # except those that define exported symbols.
@@ -200,6 +205,10 @@
     "${dawn_root}/src/dawn/platform",
   ]
 
+  if (defined(_copy_fxc_dll_target)) {
+    deps += [ _copy_fxc_dll_target ]
+  }
+
   sources = get_target_outputs(":utils_gen")
   sources += [
     "Adapter.cpp",