Skip to content

Commit 6b65f75

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 (core_tables_header.inc). Adding a dependency on spirv-tools-tables ensures these are generated before cargo runs.
1 parent 481791f commit 6b65f75

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

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

413+
# The Rust FFI build needs the grammar tables to be generated first
414+
if(SPIRV_ENABLE_RUST_TARGET_ENV)
415+
add_dependencies(spirv-tools-ffi-rust spirv-tools-tables)
416+
endif()
417+
413418
add_subdirectory(test)
414419
add_subdirectory(examples)
415420

0 commit comments

Comments
 (0)