-
Notifications
You must be signed in to change notification settings - Fork 104
Allow static building of the monolithic dawn library: (lib)webgpu_dawn #33
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
base: main
Are you sure you want to change the base?
Conversation
manuel5975p
commented
Apr 23, 2025
- Update BundleLibraries to take another argument (STATIC or SHARED)
- Change DAWN_BUILD_MONOLITHIC_LIBRARY from OFF/ON to OFF/STATIC/SHARED
👋 Thanks for your contribution! Your PR has been imported to Gerrit. |
- Update BundleLibraries to take another argument (STATIC or SHARED) - Change DAWN_BUILD_MONOLITHIC_LIBRARY from OFF/ON to OFF/STATIC/SHARED This is an imported pull request from google#33 GITHUB_PR_HEAD_SHA=74b9f13d2c44fbdc8bc8cbede44325ff1f75b164 ORIGINAL_AUTHOR=Manuel <[email protected]> GitOrigin-RevId: 44f76ba Change-Id: I69dc673656e43c6c1a3c710ece00ecf16a8b9cde
@manuel5975p Thank You for making this PR, this is an option that would be useful to us as well |
I saw the change is merged (https://dawn-review.googlesource.com/c/dawn/+/238874). However, the implementation is changed and the following change is no longer there:
With the latest change, how do I consume Dawn as a monolithic (static/dynamic) library? Is there an example? |
You'd use the standard CMake variable |
I am not directly building Dawn but consume it as a dependency in my project. I got the following error: Error Messages
This used to work before this change is merged. Do you know how I can fix it? |
I also tried to use |
Can you check if https://dawn-review.googlesource.com/c/dawn/+/254234 fixes it? |
Now that it works with static build! but the dynamic build (BUILD_SHARED_LIBS=ON) failed of the following error message:
|
Try again with https://dawn-review.googlesource.com/c/dawn/+/254234/ and the previous commit? But Dawn doesn't use |
Are you building with DXC? You may want to try disabling that as it's possibly what's triggering the clang in your build. (It's the only thing in Dawn that would build clang). Setting |
Yes I am building DXC. I cannot set DAWN_USE_BUILT_DXC to false because a few features are guarded by the build definition (eg. ShaderF16). dawn/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp Lines 183 to 188 in 13c822e
|
I tried the latest change (Patchset 4) and do not set the previous build error related to |