Skip to content

ggml: Change default visibility of symbols to hidden - #30014

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
ckastner:ggml-visibility-hidden
Oct 12, 2026
Merged

ggerganov merged 1 commit into
ggml-org:masterfrom
ckastner:ggml-visibility-hidden

Conversation

@ckastner

@ckastner ckastner commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Overview

See discussion in #29997. This prevents a handful of internal symbols leaking via GGML_API.

Additional information

Using scripts/check-apiabi-compat.sh to compare build results before and after this change, this causes hiding of the following symbols:

7 Removed function symbols not referenced by debug info:
 
  [D] ggml_graph_next_uid
  [D] ggml_graph_view
  [D] ggml_hash_set_free
  [D] ggml_hash_set_new
  [D] ggml_hash_set_reset
  [D] ggml_hash_size
  [D] ggml_print_backtrace
 
1 Removed variable symbol not referenced by debug info:
 
  [D] ggml_critical_section_mutex

None of these are in ggml/include so I hiding them seems to be the right thing to do.

I also tried changing the visibility for llama.cpp, but the build then failed, so the default visibility does matter there. I'm not sure it's worth the effort to dig down, instead of waiting for an actual problem first.

@ggerganov WDYT?

Requirements

See discussion in ggml-org#29997. This prevents a handful of internal symbols
leaking via GGML_API.
@ggerganov

Copy link
Copy Markdown
Member

Yes, libllama is not ready for default hidden. But ggml should be good I think.

@ggerganov ggerganov self-assigned this Oct 5, 2026
@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Oct 5, 2026
@ckastner

Copy link
Copy Markdown
Collaborator Author

@ggerganov pinging, just to ensure that this doesn't affect the next release.

I think the test errors are unrelated. But I could rebase and trigger a new test?

@ggerganov
ggerganov merged commit a05e58c into ggml-org:master Oct 12, 2026
26 of 32 checks passed
@ggerganov

Copy link
Copy Markdown
Member

Thanks for the ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants