Skip to content

Enable tint command build with CMake #38

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

eliemichel
Copy link
Contributor

@eliemichel eliemichel commented Jun 1, 2025

The initial motivation for this contribution is to build and share the tint CLI in the GitHub Action workflow.

In theory enabling CMake options TINT_BUILD_CMD_TOOLS and TINT_ENABLE_INSTALL in dawn-ci.cmake should have been enough, but I had to fix a few things:

  • tint_add_target did not add INSTALL rules for targets of type cmd. It is now the case, through the new tint_cmd_compile_options that follows the same pattern than for other target types.
  • Some modules of tint's HLSL writer were missing an enable guard to disable them when TINT_BUILD_HLSL_WRITER is OFF (which happens for instance on macOS -- example of problematic run). I add here the missing BUILD.cfg files and run the gen script to adapt all BUILD.cmake etc files

Future prospects:

  • Adding TINT_ENABLE_INSTALL to get the executable CLI also adds all static libs from tint, which makes the resulting precompiled artifacts heavier.
  • We probably need to adapt the GitHub Action workflow file to specify which targets we want to install (instead of installing everything that was built like we currently do)
  • And since we're at it, we may want to call cmake install twice with different cocktails of options, so that we provide both a minimal and a full precompiled artifact in releases.

Copy link

github-actions bot commented Jun 1, 2025

👋 Thanks for your contribution! Your PR has been imported to Gerrit.
Please visit https://dawn-review.googlesource.com/c/dawn/+/244736 to see it and CC yourself on the change.
After iterating on feedback, please comment on the Gerrit review to notify reviewers.
All reviews are handled within Gerrit, any comments on the GitHub PR may be missed.
You can continue to upload commits to this PR, and they will be automatically imported
into Gerrit.

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.

1 participant