Skip to content

Remove logger dependency on libccf#7977

Draft
Copilot wants to merge 6 commits into
mainfrom
copilot/remove-logger-dependency-libccf
Draft

Remove logger dependency on libccf#7977
Copilot wants to merge 6 commits into
mainfrom
copilot/remove-logger-dependency-libccf

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Closes #7596.

logger.h pulled in get_current_thread_id() from libccf.a, creating an implicit circular dependency for libraries such as ccfcrypto that are themselves dependencies of ccf.

  • Thread ID ownership

    • Moved thread ID state and helpers into src/threading/thread_ids.cpp, compiled into ccfcrypto, so logger users share a single implementation without linking libccf.
    • Preserved existing APIs: get_current_thread_id(), set_current_thread_id(), and reset_thread_id_generator().
  • Build graph cleanup

    • Removed src/enclave/thread_local.cpp.
    • Removed CMake references that explicitly compiled thread_local.cpp into tests, benchmarks, and tools.
    • Removed the app linker workaround forcing get_current_thread_id resolution from ccf.
  • Coverage

    • Added a focused logger unit test for thread ID assignment, reset, and per-thread initialization.

Copilot AI and others added 2 commits June 24, 2026 21:28
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove logger dependency on libccf.a to resolve circular issues Remove logger dependency on libccf Jun 24, 2026
Copilot AI requested a review from achamayou June 24, 2026 21:31
@achamayou

Copy link
Copy Markdown
Member

@copilot that feels like it's going to lead to duplicated symbols, especially if applications include logger.h too.

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@copilot that feels like it's going to lead to duplicated symbols, especially if applications include logger.h too.

Moved the thread ID implementation back out of the header and into a single object compiled into ccfcrypto, so logger.h no longer owns inline state while still avoiding the libccf dependency. Addressed in aca4c8b.

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
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.

Remove logger dependency on libccf.a

2 participants