Skip to content

Commit 950f065

Browse files
committed
move target specs to new rustc_codegen_spirv_target_specs crate
1 parent 5d9750b commit 950f065

26 files changed

+68
-24
lines changed

Cargo.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ members = [
1919

2020
"crates/rustc_codegen_spirv",
2121
"crates/rustc_codegen_spirv-types",
22+
"crates/rustc_codegen_spirv_target_specs",
2223
"crates/spirv-builder",
2324
"crates/spirv-std",
2425
"crates/spirv-std/shared",
@@ -46,6 +47,7 @@ spirv-std-macros = { path = "./crates/spirv-std/macros", version = "=0.9.0" }
4647
spirv-tools = { version = "0.11", default-features = false }
4748
rustc_codegen_spirv = { path = "./crates/rustc_codegen_spirv", version = "=0.9.0", default-features = false }
4849
rustc_codegen_spirv-types = { path = "./crates/rustc_codegen_spirv-types", version = "=0.9.0" }
50+
rustc_codegen_spirv_target_specs = { path = "./crates/rustc_codegen_spirv_target_specs", version = "=0.9.0" }
4951
tracing = "0.1"
5052
tracing-subscriber = { version = "0.3.3", features = ["env-filter", "json"] }
5153

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "rustc_codegen_spirv_target_specs"
3+
description = "target spec json files of rust-gpu for the rustc compiler"
4+
version.workspace = true
5+
authors.workspace = true
6+
edition.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
9+
10+
[features]
11+
include_str = []
12+
dir_path = []
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `rustc_codegen_spirv_target_spec`
2+
3+
The target spec json files of rust-gpu to hand to the rustc compiler, declaring various metadata about our codegen backend.
4+
5+
## Features
6+
* `include_str`: include target specs as string constants, for bundling with `cargo-gpu`
7+
* `dir_path`: export a path to the target specs dir, for `spirv-builder` and `compiletest` in this repo
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![doc = include_str!("../README.md")]
2+
3+
/// directory with all the `target-specs` jsons for our codegen backend
4+
#[cfg(feature = "dir_path")]
5+
pub const TARGET_SPEC_DIR_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/target-specs");
6+
7+
#[cfg(feature = "include_str")]
8+
mod include_str;
9+
#[cfg(feature = "include_str")]
10+
pub use include_str::TARGET_SPECS;

0 commit comments

Comments
 (0)