Skip to content

Expose quill module to Bazel - #997

Merged
odygrd merged 6 commits into
odygrd:masterfrom
rdong8:bazel-cpp-module
Sep 10, 2026
Merged

odygrd merged 6 commits into
odygrd:masterfrom
rdong8:bazel-cpp-module

Conversation

@rdong8

@rdong8 rdong8 commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor
  • Bazel <= 6 no longer supported since cc_library(module_interfaces = ...) must be supported. If the consumer omits --experimental_cpp_modules but has a Bazel version supporting module_interfaces, they're still ok as long as they don't try to build the module. The module is tagged "manual" to prevent it from being accidentally bulit.
  • Adds MODULE.bazel.lock lockfile to git. It is convention to include it for Bazel projects.
  • Exclude Bazel build directories in .gitignore
  • Renames quill.cc to quill.cppm (module interface file extension)

This was assisted by AI and tested in my personal monorepo with Bazel 9.2.

Comment thread src/quill.cc
Preserve src/quill.cc and gate the Bazel module on the working Bazel 9 C++ implementation. Keep ordinary header targets usable without module flags, document the required macro and PIC settings, and retain rules_cc 0.2.22.

Make singleton accessors explicitly inline so module importers share state and automatic shutdown remains safe. Match CMake module exception settings with its consumers. Add Bazel 8/9 and CMake module workflows with standard-type, sink, cross-translation-unit, and shutdown smoke coverage.
rules_cc locates clang-scan-deps beside the selected compiler. Use Ubuntu's LLVM tool directory and install clang-tools-18 so dependency scanning can run without an unversioned scanner in /usr/bin. Document the same setup for consumers.
libstdc++ C forwarding headers can be entered again after their declarations were included in the global module fragment. Limit the Clang diagnostic suppression to those module-wrapper includes and restore diagnostics afterwards. Build the Bazel module test with warnings treated as errors.
@odygrd
odygrd merged commit bfccbb8 into odygrd:master Sep 10, 2026
63 checks passed
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.

3 participants