Skip to content

Commit 269515e

Browse files
committed
move target specs to rustc_codegen_spirv-types
1 parent fcb4fdf commit 269515e

20 files changed

+6
-4
lines changed

crates/rustc_codegen_spirv-types/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ pub use rspirv::spirv::Capability;
55
mod compile_result;
66
pub use compile_result::*;
77

8+
pub mod target_specs;
9+
pub use target_specs::TARGET_SPECS;
10+
811
// HACK(eddyb) allows downstream crates to access the correct version directly.
912
pub use serde;
1013
pub use serde_json;

crates/spirv-builder/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
#![doc = include_str!("../README.md")]
7474

7575
mod depfile;
76-
mod target_specs;
7776
#[cfg(feature = "watch")]
7877
mod watch;
7978

@@ -90,8 +89,8 @@ use std::process::{Command, Stdio};
9089
use thiserror::Error;
9190

9291
pub use rustc_codegen_spirv_types::Capability;
92+
pub use rustc_codegen_spirv_types::TARGET_SPECS;
9393
pub use rustc_codegen_spirv_types::{CompileResult, ModuleResult};
94-
pub use target_specs::TARGET_SPECS;
9594

9695
#[derive(Debug, Error)]
9796
#[non_exhaustive]

docs/src/writing-shader-crates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ how to build SPIR-V. Here are a few things we need to mention there.
120120

121121
- Path to a spec of a target you're compiling for (see [platform support](./platform-support.md)).
122122
These specs reside in a directory inside the `spirv-builder` crate and an example relative path
123-
could look like `../rust-gpu/crates/spirv-builder/target-specs/spirv-unknown-spv1.3.json`.
123+
could look like `../rust-gpu/crates/rustc_codegen_spirv-types/target-specs/spirv-unknown-spv1.3.json`.
124124
- Absolute path to the `rustc_codegen_spirv` dynamic library that we built above.
125125
- Some additional options.
126126

tests/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const SPIRV_TARGET_PREFIX: &str = "spirv-unknown-";
3131

3232
fn target_spec_json(target: &str) -> String {
3333
format!(
34-
"{}/../crates/spirv-builder/target-specs/{target}.json",
34+
"{}/../crates/rustc_codegen_spirv-types/target-specs/{target}.json",
3535
env!("CARGO_MANIFEST_DIR")
3636
)
3737
}

0 commit comments

Comments
 (0)