Skip to content

cmake: Add ability to pass in LLAMA_BUILD_NUMBER/COMMIT #14167

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

Merged
merged 2 commits into from
Jun 13, 2025

Conversation

ckastner
Copy link
Collaborator

This is useful in the case where llama.cpp is built not from git, but from a tarball, or a distribution package. We already have this for ggml (#1096 over there).

The LLAMA_BUILD_* variables are then also passed on to GGML_BUILD_*, they are both computed the same and I guess they should always be equal anyway when using the embedded ggml build?

ckastner added 2 commits June 13, 2025 10:00
This is useful in the case where llama.cpp is built not from git, but
from a tarball, or a distribution package.

We move the definitions up earlier in the file, because they must come
before add_subdirectory(common) to be effective there.
Both are computed exactly the same way, and it feels like they shouldn't
deviate anyway.
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

The LLAMA_BUILD_* variables are then also passed on to GGML_BUILD_*, they are both computed the same and I guess they should always be equal anyway when using the embedded ggml build?

I think this works. I guess we could prefix or suffix the ggml number/commit with llama.cpp if needed to disambiguate, but unless we encounter a specific problem with this, no need to do it.

p.s. Use "Squash and merge" when merging the PR

@ckastner ckastner merged commit cc8d081 into ggml-org:master Jun 13, 2025
47 checks passed
@ckastner
Copy link
Collaborator Author

p.s. Use "Squash and merge" when merging the PR

I also limited the squashed messages to their short descriptions, as I saw in some other merges. If I should keep them full in future, let me know.

@ggerganov
Copy link
Member

The body can be as detailed as we want. We just need the commit title to be formatted correctly because the sync scripts rely on this.

@github-actions github-actions bot added the build Compilation issues label Jun 13, 2025
@bandoti
Copy link
Collaborator

bandoti commented Jun 13, 2025

I'm thinking we could expand on this and update the CI to push a custom "make dist" tarball that bundles a header/text file with the version info set.

That way consumers of the tarball don't need to figure out the version info that was used to bundle it.

@bandoti
Copy link
Collaborator

bandoti commented Jun 13, 2025

@ckastner this might have broken the version numbers in the CMake package. I'm thinking I should probably add a quick CI job now to make sure those remain intact! Something I forgot to do a couple months ago 🤦‍♂️

@bandoti
Copy link
Collaborator

bandoti commented Jun 13, 2025

@ckastner It does not break the package! 😊 But I'm adding the CI just to be sure for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Compilation issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants