Commit 4f5add2
Fix circular dependency in CMake Rust FFI build
When building via CMake (SPIRV_TOOLS_FFI_SKIP_CPP_LINK=1), don't define
SPIRV_RUST_TARGET_ENV in the Rust FFI build. This allows context_bridge.cc
to include its own implementations of dispatch_context_message and
assemble_text_with_context, avoiding a circular dependency between
SPIRV-Tools and spirv-tools-ffi at link time.
Previously, SPIRV_RUST_TARGET_ENV was always defined, which caused the
stub implementations in context_bridge.cc to be skipped, expecting
text.cpp to provide them. But since spirv-tools-ffi is linked into
SPIRV-Tools, and text.cpp is part of SPIRV-Tools, this created a
circular dependency that the linker couldn't resolve.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 1aee011 commit 4f5add2
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
0 commit comments