Skip to content

Commit

Permalink
Try to pacify Bazel
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
  • Loading branch information
asl committed Jan 16, 2025
1 parent dee3a29 commit 2398728
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ genrule(
-e 's|define HAVE_LIBGC 1|undef HAVE_LIBGC|g' \
-e 's|define HAVE_LIBBACKTRACE 1|undef HAVE_LIBBACKTRACE|g' \
-e 's|define HAVE_MM_MALLOC_H 1|undef HAVE_MM_MALLOC_H|g' \
< $(SRCS) > $(OUTS)",
-e 's|define HAVE_MM_MALLOC_H 1|undef HAVE_MM_MALLOC_H|g' \
-e 's|@MAX_LOGGING_LEVEL@|10|g' \
# Where p4c should look for p4include at runtime.
# This will work only if the binary is executed by Bazel. For a general
# solution, we would need to make p4c aware of Bazel, specifically:
# https://github.com/bazelbuild/bazel/blob/master/tools/cpp/runfiles/runfiles_src.h
-e 's|@CONFIG_PKGDATADIR@|external/%s|g' \
< $(SRCS) > $(OUTS)" % repository_name(),
visibility = ["//visibility:private"],
)

Expand Down Expand Up @@ -215,13 +222,6 @@ cc_library(
"backends/dpdk/dbprint-dpdk.cpp",
"backends/dpdk/printUtils.cpp",
],
copts = [
# Where p4c should look for p4include at runtime.
("-DCONFIG_PKGDATADIR=\\\"external/%s\\\"" % repository_name()),
# This will work only if the binary is executed by Bazel. For a general
# solution, we would need to make p4c aware of Bazel, specifically:
# https://github.com/bazelbuild/bazel/blob/master/tools/cpp/runfiles/runfiles_src.h
],
textual_hdrs = glob([
"ir/**/*.h",
"frontends/**/*.h",
Expand Down

0 comments on commit 2398728

Please sign in to comment.