Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to allow msvcrtd linking for static builds in debug mode? #110

Open
star69rem opened this issue Aug 28, 2024 · 7 comments
Open

Comments

@star69rem
Copy link

star69rem commented Aug 28, 2024

The latest version of Librashader is very nice. It's much easier to compile static release builds now. I'm wondering if anything has changed where it might be possible to allow for debug static builds now. See rust-lang/rust#122268 and rust-lang/rust#39016 for reference.

Currently when you build librashader in debug mode, it still links msvcrt in release mode I think.

@chyyran
Copy link
Member

chyyran commented Aug 28, 2024

I’m not sure what code changes are actually needed for this. librashader-build-script can take arbitrary cargo flags, or you can just build with cargo directly (the build-script does nothing special but move files around)

@star69rem
Copy link
Author

It looks like it's glslang related.

2>lld-link : error : /failifmismatch: mismatch detected for '_ITERATOR_DEBUG_LEVEL':
2>>>> libcpmtd.lib(xtime.obj) has value 2
2>>>> librashader.lib(7ab23a0f9ec12564-glslang_c_interface.o) has value 0

@chyyran
Copy link
Member

chyyran commented Aug 29, 2024

Maybe glslang is missing a debug flag?

https://github.com/SnowflakePowered/glslang-rs/blob/master/glslang-sys/build.rs

@chyyran
Copy link
Member

chyyran commented Sep 7, 2024

This is what cc says.

Perhaps try building with the environment variable DEBUG=1 set?

@star69rem
Copy link
Author

Same thing with DEBUG=1.

2>lld-link : error : /failifmismatch: mismatch detected for '_ITERATOR_DEBUG_LEVEL':
2>>>> libcpmtd.lib(xtime.obj) has value 2
2>>>> librashader.lib(7ab23a0f9ec12564-glslang_c_interface.o) has value 0

@chyyran
Copy link
Member

chyyran commented Sep 18, 2024

rust-lang/rust#122268 (comment)

Does doing whats indicated here work?

@chyyran
Copy link
Member

chyyran commented Oct 6, 2024

This is blocking on support in cc. See rust-lang/cc-rs#1230.

Once cc updates spirv-cross2 and glslang will also need updates.

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

No branches or pull requests

2 participants