Update Bazel build to fix warnings and a failure

This commit is contained in:
Nicholas Wilson
2025-09-26 06:44:44 +00:00
committed by GitHub
parent 07e1dea8fa
commit 4d3b779c19
2 changed files with 25 additions and 7 deletions

View File

@@ -24,7 +24,6 @@ LOCAL_DEFINES = [
"HAVE_CONFIG_H",
"HAVE_MEMMOVE",
"HAVE_STRERROR",
"PCRE2_CODE_UNIT_WIDTH=8",
"PCRE2_STATIC",
"SUPPORT_PCRE2_8",
"SUPPORT_UNICODE",
@@ -99,20 +98,39 @@ cc_library(
],
hdrs = [":pcre2_h_generic"],
implementation_deps = [":pcre2_internal_headers"],
local_defines = LOCAL_DEFINES,
local_defines = LOCAL_DEFINES + [
"PCRE2_CODE_UNIT_WIDTH=8",
],
strip_include_prefix = "src",
visibility = ["//visibility:public"],
)
# See below for explanation of why we need this.
#
# https://github.com/bazelbuild/bazel/issues/680
cc_library(
name = "pcre2posix_dotc_headers",
hdrs = [
"src/pcre2_tables.c",
],
strip_include_prefix = "src",
visibility = ["//visibility:private"],
)
cc_library(
name = "pcre2-posix",
srcs = ["src/pcre2posix.c"],
hdrs = ["src/pcre2posix.h"],
implementation_deps = [":pcre2_internal_headers"],
local_defines = LOCAL_DEFINES,
local_defines = LOCAL_DEFINES + [
"PCRE2_CODE_UNIT_WIDTH=8",
],
strip_include_prefix = "src",
visibility = ["//visibility:public"],
deps = [":pcre2"],
deps = [
":pcre2",
":pcre2posix_dotc_headers",
],
)
# Totally weird issue in Bazel. It won't let you #include any files unless they

View File

@@ -4,6 +4,6 @@ module(
compatibility_level = 1,
)
bazel_dep(name = "rules_cc", version = "0.0.1")
bazel_dep(name = "bazel_skylib", version = "1.2.1")
bazel_dep(name = "platforms", version = "0.0.4")
bazel_dep(name = "rules_cc", version = "0.2.8")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "platforms", version = "1.0.0")