Skip to content

Commit 23f7dcb

Browse files
Slightly fixed shaders building pipeline
Previously it included debug symbols unconditionally.
1 parent 85958b8 commit 23f7dcb

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

mopro-msm/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ default = ["macos"]
99

1010
macos = []
1111
ios = []
12+
profiling-release = []
1213

1314
[dependencies]
1415
## Shared dependencies

mopro-msm/build.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,12 @@ fn compile_shaders() {
2525
get_sdk(),
2626
"metal",
2727
"-c",
28-
"-frecord-sources",
2928
shader_path.to_str().unwrap(),
3029
"-o",
3130
air_output.to_str().unwrap(),
3231
];
3332

34-
if std::env::var("PROFILE")
35-
.map(|profile| profile == "release")
36-
.unwrap_or(false)
37-
{
33+
if cfg!(feature = "profiling-release") {
3834
args.push("-frecord-sources");
3935
}
4036

@@ -62,10 +58,7 @@ fn compile_shaders() {
6258
metallib_output.to_str().unwrap(),
6359
];
6460

65-
if std::env::var("PROFILE")
66-
.map(|profile| profile == "release")
67-
.unwrap_or(false)
68-
{
61+
if cfg!(feature = "profiling-release") {
6962
metallib_args.push("-frecord-sources");
7063
}
7164

0 commit comments

Comments
 (0)