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

cmake: option to build a static library version of slang #3578

Merged
merged 4 commits into from
Feb 16, 2024
Merged

cmake: option to build a static library version of slang #3578

merged 4 commits into from
Feb 16, 2024

Conversation

fknfilewalker
Copy link
Contributor

@fknfilewalker fknfilewalker commented Feb 13, 2024

This adds an option to cmake that allows to build and link a static version of the slang library.
The resulting slang.lib is about 1 GB in size in debug, which is a bit on the larger side but I don't know why.

@fknfilewalker fknfilewalker changed the title cmake: option to build a static library of slang cmake: option to build a static library version of slang Feb 13, 2024
@expipiplus1
Copy link
Collaborator

ok looks good, I think that the name would be better as SLANG_LIB_TYPE (or maybe SLANG_SLANG_LIB_TYPE)

@expipiplus1
Copy link
Collaborator

@fknfilewalker just to make sure, you've tested this and it's useful to you right? If so then it's good to merge.

@csyonghe csyonghe merged commit b50d311 into shader-slang:master Feb 16, 2024
10 checks passed
@fknfilewalker
Copy link
Contributor Author

Yes I did run it. The only downside is the quite large lib size.
There is a whole blog about making dxc better just by building it as a static library so I guess this could be useful to more people.
https://devlog.hexops.com/2024/building-the-directx-shader-compiler-better-than-microsoft/

@fknfilewalker fknfilewalker deleted the cmake_slang_static_option branch March 3, 2024 12:52
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.

None yet

3 participants