Skip to content

Commit 12e12c5

Browse files
amaioranoDawn LUCI CQ
authored andcommitted
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 <[email protected]> Reviewed-by: Corentin Wallez <[email protected]> Commit-Queue: Antonio Maiorano <[email protected]>
1 parent 89df6de commit 12e12c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/dawn/native/BUILD.gn

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ source_set("headers") {
164164
]
165165
}
166166

167+
if (dawn_standalone && (dawn_enable_d3d11 || dawn_enable_d3d12)) {
168+
# Use ANGLE's target as it's always available in standalone builds
169+
_copy_fxc_dll_target = "//third_party/angle:copy_compiler_dll"
170+
}
171+
167172
# The meat of the compilation for dawn native so that we can cheaply have
168173
# shared_library / static_library versions of it. It compiles all the files
169174
# except those that define exported symbols.
@@ -200,6 +205,10 @@ source_set("sources") {
200205
"${dawn_root}/src/dawn/platform",
201206
]
202207

208+
if (defined(_copy_fxc_dll_target)) {
209+
deps += [ _copy_fxc_dll_target ]
210+
}
211+
203212
sources = get_target_outputs(":utils_gen")
204213
sources += [
205214
"Adapter.cpp",

0 commit comments

Comments
 (0)