Skip to content

build: plugins: Generate plugin defs on separated build directories#12109

Open
cosmo0920 wants to merge 1 commit into
masterfrom
cosmo0920-use-separated-generated-plugin-defs
Open

build: plugins: Generate plugin defs on separated build directories#12109
cosmo0920 wants to merge 1 commit into
masterfrom
cosmo0920-use-separated-generated-plugin-defs

Conversation

@cosmo0920

@cosmo0920 cosmo0920 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

When building in the several build directories, the generated flb_plugins.h would be collided.
So, we need to manage in the different directory for the generated header.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

  • Chores
    • Updated the build process to generate plugin headers in the build directory rather than modifying the source tree.
    • Improved build configuration to locate generated headers automatically.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 90765b68-c7c7-4994-8c68-91bf320ab44a

📥 Commits

Reviewing files that changed from the base of the PR and between 064e90b and 9cab86e.

📒 Files selected for processing (2)
  • cmake/headers.cmake
  • plugins/CMakeLists.txt

📝 Walkthrough

Walkthrough

CMake now generates flb_plugins.h under the build directory and adds the generated include directory to the compiler include paths.

Changes

Generated Header Build Path

Layer / File(s) Summary
Binary-tree generated header wiring
plugins/CMakeLists.txt, cmake/headers.cmake
Creates the binary-tree output directory, writes flb_plugins.h there, and exposes ${FLB_PATH_ROOT_BINARY_DIR}/generated/include to builds.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: edsiper, celalettin1286

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: generating plugin definitions in separate build directories to avoid collisions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cosmo0920-use-separated-generated-plugin-defs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants