File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ configure_make(
1414 configure_options = [
1515 "--with-apr=$$EXT_BUILD_DEPS/apr",
1616 "--with-expat=$$EXT_BUILD_DEPS/expat",
17+ "--without-pgsql",
1718 ],
1819 env = select({
1920 "@platforms//os:macos": {"AR": ""},
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ def gn_repositories():
88 new_git_repository ,
99 name = "gn" ,
1010 build_file = Label ("//gn:BUILD.gn.bazel" ),
11- commit = "dfcbc6fed0a8352696f92d67ccad54048ad182b3 " ,
11+ commit = "281ba2c91861b10fec7407c4b6172ec3d4661243 " ,
1212 patch_args = [],
1313 patch_tool = "bash" ,
1414 patches = [Label ("//gn:patch.gen_ninja.sh" )],
1515 remote = "https://gn.googlesource.com/gn" ,
16- shallow_since = "1612864120 +0000" ,
16+ shallow_since = "1639743738 +0000" ,
1717 )
Original file line number Diff line number Diff line change 11load ("@bazel_skylib//rules:build_test.bzl" , "build_test" )
22# load("@rules_cc//cc:defs.bzl", "cc_test")
33
4+ load ("@rules_cc//cc:defs.bzl" , "cc_test" )
5+
46exports_files (
57 [
68 "BUILD.gperftools.bazel" ,
79 ],
810 visibility = ["//visibility:public" ],
911)
1012
11- # TODO(rules_foreign_cc#227) This currently gives an error:
12- # "ERROR: <...>/use_malloc/BUILD:17:14: in malloc attribute of cc_test rule //:test:
13- # configure_make rule '@gperftools//:gperftools_build' is misplaced here (expected cc_library)"
14- # cc_test(
15- # name = "malloc_test",
16- # srcs = ["malloc_test.cpp"],
17- # malloc = "@gperftools//:gperftools_build",
18- # )
13+ cc_test (
14+ name = "malloc_test" ,
15+ srcs = ["malloc_test.cc" ],
16+ malloc = "@gperftools//:gperftools_build" ,
17+ )
1918
2019build_test (
2120 name = "build_test" ,
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ configure_make(
1515 "--enable-frame-pointers",
1616 "--disable-libunwind",
1717 ],
18+ copts = [
19+ # This package requires c++17, and bazel 7.x's default BAZEL_CXXOPTS is
20+ # set to -std=c++14, so override.
21+ "-std=c++17",
22+ ],
1823 env = select({
1924 "@platforms//os:macos": {"AR": ""},
2025 "//conditions:default": {},
@@ -26,5 +31,14 @@ configure_make(
2631 "@platforms//os:windows": ["@platforms//:incompatible"],
2732 "//conditions:default": [],
2833 }),
34+ targets = [
35+ # Something is wrong about the project's gtest wiring, resulting in
36+ # unittests failing to build due to being unable to find gtest.h. They
37+ # don't provide any official method to bypass building the tests, so
38+ # work around it by calling the make targets we require directly.
39+ "install-libLTLIBRARIES",
40+ "install-perftoolsincludeHEADERS",
41+ "install-nodist_perftoolsincludeHEADERS",
42+ ],
2943 visibility = ["//visibility:public"],
3044)
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ def gperftools_repositories():
88 http_archive ,
99 name = "gperftools" ,
1010 build_file = Label ("//gperftools:BUILD.gperftools.bazel" ),
11- sha256 = "1ee8c8699a0eff6b6a203e59b43330536b22bbcbe6448f54c7091e5efb0763c9 " ,
12- strip_prefix = "gperftools-2.7 " ,
13- urls = ["https://github.com/gperftools/gperftools/releases/download/gperftools-2.7 /gperftools-2.7 .tar.gz" ],
11+ sha256 = "f12624af5c5987f2cc830ee534f754c3c5961eec08004c26a8b80de015cf056f " ,
12+ strip_prefix = "gperftools-2.16 " ,
13+ urls = ["https://github.com/gperftools/gperftools/releases/download/gperftools-2.16 /gperftools-2.16 .tar.gz" ],
1414 )
Original file line number Diff line number Diff line change @@ -15,8 +15,18 @@ filegroup(
1515cmake(
1616 name = "pcre",
1717 cache_entries = {
18- "CMAKE_C_FLAGS": "$${CMAKE_C_FLAGS:-} -fPIC",
19- },
18+ "CMAKE_DISABLE_FIND_PACKAGE_BZip2": "TRUE",
19+ "PCRE2_SUPPORT_LIBZ": "ON",
20+ } | select({
21+ "@platforms//os:windows": {
22+ # PCRE2 adds a "d" postfix for MSVC debug builds by default; keep the
23+ # archive name stable so Bazel can locate the declared output.
24+ "CMAKE_DEBUG_POSTFIX": "",
25+ },
26+ "//conditions:default": {
27+ "CMAKE_C_FLAGS": "$${CMAKE_C_FLAGS:-} -fPIC",
28+ },
29+ }),
2030 lib_source = ":all_srcs",
2131 out_static_libs = select({
2232 "@platforms//os:windows": ["pcre2-8.lib"],
2636 "@platforms//os:windows": ["@rules_foreign_cc_examples_third_party//:broken"],
2737 "//conditions:default": [],
2838 }),
39+ deps = ["@examples_zlib//:zlib"],
2940)
3041
3142filegroup(
You can’t perform that action at this time.
0 commit comments