Skip to content
Draft
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: 7 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
common --announce_rc
common --verbose_failures
common --sandbox_debug

common --cxxopt=-std=c++20

test --test_output=streamed
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ test/data/*.pprof
test/self_unwind/data/BadBoggleSolver_run.json
cpp-security-quality.sarif
test/data/ipc_test_data_Positive.txt

MODULE.bazel.lock
bazel-*
39 changes: 39 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
load("@rules_bison//bison:bison.bzl", "bison")
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_flex//flex:flex.bzl", "flex")

cc_library(
name = "hdrs",
hdrs = glob(["include/*.hpp"]) + [
":event_parser_lex",
":event_parser_yacc",
],
includes = ["include"],
)

cc_library(
name = "ddprof",
srcs = glob([
"src/*.cc",
]) + [
":event_parser_lex",
":event_parser_yacc",
],
copts = ["-fPIC"],
deps = [
":hdrs",
"@abseil-cpp//absl/strings",
"@jemalloc",
"@libcap",
],
)

bison(
name = "event_parser_yacc",
src = "src/event_parser/event_parser.y",
)

flex(
name = "event_parser_lex",
src = "src/event_parser/event_parser.l",
)
16 changes: 16 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module(
name = "ddprof",
version = "0.19.0",
bazel_compatibility = [">=7.2.1"], # need support for "overlay" directory
compatibility_level = 0,
)

bazel_dep(name = "abseil-cpp", version = "20250512.1")
bazel_dep(name = "jemalloc", version = "5.3.0-bcr.alpha.4")
bazel_dep(name = "libcap", version = "2.27")
bazel_dep(name = "rules_bison", version = "0.4")
bazel_dep(name = "rules_cc", version = "0.1.2")
bazel_dep(name = "rules_flex", version = "0.4")

# For tests.
bazel_dep(name = "googletest", version = "1.17.0", dev_dependency = True)