Skip to content

Commit d5211be

Browse files
committed
Ensure grammar tables are generated before Rust FFI build
The Rust FFI crate compiles context_bridge.cc which includes headers that depend on generated grammar tables and debug info headers. Adding dependencies on spirv-tools-tables and the spirv-tools-header-* targets ensures these are generated before cargo runs.
1 parent 481791f commit d5211be

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,15 @@ endif()
410410
add_subdirectory(source)
411411
add_subdirectory(tools)
412412

413+
# The Rust FFI build needs generated headers to exist first
414+
if(SPIRV_ENABLE_RUST_TARGET_ENV)
415+
add_dependencies(spirv-tools-ffi-rust
416+
spirv-tools-tables
417+
spirv-tools-header-DebugInfo
418+
spirv-tools-header-OpenCLDebugInfo100
419+
spirv-tools-header-NonSemanticShaderDebugInfo100)
420+
endif()
421+
413422
add_subdirectory(test)
414423
add_subdirectory(examples)
415424

0 commit comments

Comments
 (0)