Repository navigation
Bazel support - #27
Merged
Merged
Conversation
Adds MODULE.bazel + BUILD.bazel building naja_verilog as a real Bazel module, so downstream consumers (e.g. najaeda/naja's own CMake-to-Bazel migration) can depend on it via bazel_dep + git_override instead of a non-module git_repository fetch with an external overlay BUILD file. Custom Bison/Flex codegen rules (bazel/verilog_codegen.bzl) run the system-installed bison/flex directly rather than using the community rules_bison/rules_flex rules, because their generic bison_action() helper doesn't account for the auxiliary location.hh header the `%skeleton "lalr1.cc"` C++ skeleton also emits (VerilogScanner.h includes it directly). bazel/system_tool.bzl locates bison/flex/m4 the same way CMake's find_package(BISON REQUIRED)/find_package(FLEX REQUIRED) do, and separately locates the FlexLexer.h matching the resolved flex binary (mirroring src/CMakeLists.txt's FLEX_INCLUDE_DIRS handling), since a mismatched system FlexLexer.h (e.g. Xcode's on macOS) fails to link against flex-generated scanners. Validated: `bazel build //:naja_verilog` compiles cleanly, and the existing naja_verilog_test snippet (now also a Bazel cc_binary target) correctly parses real Verilog from test/benchmarks/*.v.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
============================================
- Coverage 100.00% 83.24% -16.76%
============================================
Files 10 8 -2
Lines 706 716 +10
============================================
- Hits 706 596 -110
- Misses 0 120 +120
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.