Commit ec2c2be
Always define SPIRV_RUST_TARGET_ENV in context_bridge.cc compilation
When compiling context_bridge.cc via cargo (build.rs), we must always
define SPIRV_RUST_TARGET_ENV. This ensures:
1. We skip C++ includes that need generated headers (reducer.h, libspirv.hpp)
2. We delegate to Rust implementations (validate_binary_rust, etc.)
3. We don't provide duplicate implementations of dispatch_context_message
and assemble_text_with_context (text.cpp provides these in CMake builds
when SPIRV_RUST_TARGET_ENV is defined there too)
The previous conditional logic caused multiple definition errors because
in CMake builds, both context_bridge.cc and text.cpp were providing
implementations of the same functions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent efca9f1 commit ec2c2be
1 file changed
Lines changed: 8 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
48 | 40 | | |
49 | 41 | | |
50 | 42 | | |
| |||
0 commit comments