Skip to content

Commit 86fc480

Browse files
committed
rename feature include_target_specs to include-target-specs
1 parent 3dda1ae commit 86fc480

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

crates/spirv-builder/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ default = ["use-compiled-tools"]
2424
rustc_codegen_spirv = ["dep:rustc_codegen_spirv"]
2525
# Inclide target spec json files, allows constructing SpirvBuilder without
2626
# explicitly passing a path to the target spec json
27-
include_target_specs = ["dep:rustc_codegen_spirv-target-specs"]
27+
include-target-specs = ["dep:rustc_codegen_spirv-target-specs"]
2828
# See `rustc_codegen_spirv/Cargo.toml` for details on these features.
2929
# We add new "default" features to `use-installed-tools` and `use-compiled-tools` to keep
3030
# backwards compat with `default-features = false, features = "use-installed-tools"` setups
31-
use-installed-tools = ["rustc_codegen_spirv", "include_target_specs", "rustc_codegen_spirv?/use-installed-tools"]
32-
use-compiled-tools = ["rustc_codegen_spirv", "include_target_specs", "rustc_codegen_spirv?/use-compiled-tools"]
31+
use-installed-tools = ["rustc_codegen_spirv", "include-target-specs", "rustc_codegen_spirv?/use-installed-tools"]
32+
use-compiled-tools = ["rustc_codegen_spirv", "include-target-specs", "rustc_codegen_spirv?/use-compiled-tools"]
3333
skip-toolchain-check = ["rustc_codegen_spirv?/skip-toolchain-check"]
3434

3535
watch = ["dep:notify"]

crates/spirv-builder/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ use thiserror::Error;
9191
pub use rustc_codegen_spirv_types::Capability;
9292
pub use rustc_codegen_spirv_types::{CompileResult, ModuleResult};
9393

94-
#[cfg(feature = "include_target_specs")]
94+
#[cfg(feature = "include-target-specs")]
9595
pub use rustc_codegen_spirv_target_specs::TARGET_SPEC_DIR_PATH;
9696

9797
#[derive(Debug, Error)]
@@ -114,7 +114,7 @@ pub enum SpirvBuilderError {
114114
#[error("`rustc_codegen_spirv_location` path '{0}' is not a file")]
115115
RustcCodegenSpirvDylibDoesNotExist(PathBuf),
116116
#[error(
117-
"Without feature `include_target_specs`, instead of setting a `target`, \
117+
"Without feature `include-target-specs`, instead of setting a `target`, \
118118
you need to set the path of the target spec file of your particular target with `path_to_target_spec`"
119119
)]
120120
MissingTargetSpec,
@@ -983,12 +983,12 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
983983
if toolchain_rustc_version >= Version::new(1, 76, 0) {
984984
let path_opt = builder.path_to_target_spec.clone();
985985
let path;
986-
#[cfg(feature = "include_target_specs")]
986+
#[cfg(feature = "include-target-specs")]
987987
{
988988
path = path_opt
989989
.unwrap_or_else(|| PathBuf::from(format!("{TARGET_SPEC_DIR_PATH}/{target}.json")));
990990
}
991-
#[cfg(not(feature = "include_target_specs"))]
991+
#[cfg(not(feature = "include-target-specs"))]
992992
{
993993
path = path_opt.ok_or(SpirvBuilderError::MissingTargetSpec)?;
994994
}

0 commit comments

Comments
 (0)