Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel: add compile commands generator #24596

Merged
merged 8 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ _helm_e2e_artifacts/

# bazel
bazel-*
user.bazelrc
/external

# Vagrant
.vagrant/
Expand Down Expand Up @@ -264,8 +266,5 @@ vbuild/
#asdf tool version file
.tool-versions

# bazel
user.bazelrc

# Ctest
/Testing
/Testing
5 changes: 5 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ alias(
name = "rpk",
actual = "//src/go/rpk/cmd/rpk:rpk",
)

alias(
name = "cc_gen",
actual = "//bazel/compilation_database_generator",
)
7 changes: 0 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ module(
repo_name = "com_github_redpanda_data_redpanda",
)

bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
commit = "a14ad3a64e7bf398ab48105aaa0348e032ac87f8",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
)

bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost")
archive_override(
module_name = "rules_boost",
Expand Down
50 changes: 0 additions & 50 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions bazel/compilation_database_generator/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load("@rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
name = "compilation_database_generator_lib",
srcs = ["main.go"],
importpath = "github.com/redpanda-data/redpanda/bazel/compilation_database_generator",
visibility = ["//visibility:private"],
)

go_binary(
name = "compilation_database_generator",
embed = [":compilation_database_generator_lib"],
visibility = ["//visibility:public"],
)
Loading
Loading