Commit efca9f1
Fix Bazel and CMake Rust FFI builds with separate env vars
The previous fix used SPIRV_TOOLS_FFI_SKIP_CPP_LINK to determine whether
to define SPIRV_RUST_TARGET_ENV, but both Bazel and CMake set this
variable. This caused the Bazel build to fail because it tried to
include generated SPIRV-Tools headers that don't exist in the sandbox.
This fix adds a new environment variable SPIRV_RUST_TARGET_ENV_DEFINE
that Bazel sets to explicitly request Rust-only implementations. The
logic is now:
- Standalone cargo build: Define SPIRV_RUST_TARGET_ENV, use Rust stubs
- Bazel build: Define SPIRV_RUST_TARGET_ENV, use Rust stubs
- CMake build: Don't define, use C++ implementations with C++ libraries
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 7fe4c98 commit efca9f1
2 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
| |||
0 commit comments