mirror of
https://github.com/PCRE2Project/pcre2.git
synced 2025-10-14 10:38:39 +08:00
Update Bazel build to fix warnings and a failure
This commit is contained in:
26
BUILD.bazel
26
BUILD.bazel
@@ -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
|
||||
|
@@ -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")
|
||||
|
Reference in New Issue
Block a user