Skip to content

Preserve existing dylib paths before calling spirv-builder#61

Merged
LegNeato merged 1 commit intoRust-GPU:mainfrom
bspeice:preserve_paths
Mar 30, 2025
Merged

Preserve existing dylib paths before calling spirv-builder#61
LegNeato merged 1 commit intoRust-GPU:mainfrom
bspeice:preserve_paths

Conversation

@bspeice
Copy link
Contributor

@bspeice bspeice commented Mar 29, 2025

In #20, spirv-builder-cli sets up the environment to load rustc_codegen_spirv, but does so without preserving existing paths. Because spirv-builder-cli sets the PATH variable on Windows, spirv-builder is then unable to find the cargo command, causing the issues seen in #50.

Instead, prepend the necessary paths so spirv-builder can find cargo.

Copy link

@LegNeato LegNeato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you! 🚀

@tombh
Copy link
Collaborator

tombh commented Mar 30, 2025

Great find @bspeice! So does this PR fix the issue you mentioned in your comment?

My only thought about this PR was whether each of the other platform ENV vars were also lists, and it looks like they are.

DYLD_FALLBACK_LIBRARY_PATH
This is a colon separated list of directories that contain libraries. It is used as the default location for libraries not found in their install path. By default, it is set to $(HOME)/lib:/usr/local/lib:/lib:/usr/lib.

LD_LIBRARY_PATH
List of directories where the system searches for runtime libraries in addition to those hard-defined by ld and in /etc/ld.so.conf.d/*.conf files.

So I approve this PR too ✅

@bspeice
Copy link
Contributor Author

bspeice commented Mar 30, 2025

@tombh - yes, this resolves the "spirv-builder can't find cargo" issue in my comment.

@LegNeato LegNeato merged commit 2fb1557 into Rust-GPU:main Mar 30, 2025
6 checks passed
@bspeice bspeice deleted the preserve_paths branch March 30, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants