Add CMake+Bazel dependencies on utf8_range repo

pull/13171/head
Mike Kruskal 2 years ago
parent c7456d1d9f
commit 3e078f5fe4
  1. 3
      .gitmodules
  2. 8
      BUILD
  3. 3
      WORKSPACE
  4. 8
      bazel/workspace_deps.bzl
  5. 2
      cmake/BUILD.bazel
  6. 4
      cmake/CMakeLists.txt
  7. 5
      cmake/make_cmakelists.py
  8. 1
      third_party/utf8_range
  9. 2
      upb/wire/decode_internal.h

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "third_party/utf8_range"]
path = third_party/utf8_range
url = https://github.com/protocolbuffers/utf8_range.git

@ -1069,7 +1069,7 @@ cc_library(
":message_internal",
":mini_table_internal",
":port",
"//third_party/utf8_range",
"@utf8_range//:utf8_range",
],
)
@ -1146,7 +1146,7 @@ cc_library(
srcs = ["upb.c"],
hdrs = ["upb.h"],
copts = UPB_DEFAULT_COPTS,
deps = ["//third_party/utf8_range"],
deps = ["@utf8_range//:utf8_range"],
)
upb_amalgamation(
@ -1184,7 +1184,7 @@ cc_library(
srcs = ["php-upb.c"],
hdrs = ["php-upb.h"],
copts = UPB_DEFAULT_COPTS,
deps = ["//third_party/utf8_range"],
deps = ["@utf8_range//:utf8_range"],
)
upb_amalgamation(
@ -1221,7 +1221,7 @@ cc_library(
srcs = ["ruby-upb.c"],
hdrs = ["ruby-upb.h"],
copts = UPB_DEFAULT_COPTS,
deps = ["//third_party/utf8_range"],
deps = ["@utf8_range//:utf8_range"],
)
exports_files(

@ -8,6 +8,9 @@ upb_deps()
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
load("@utf8_range//:workspace_deps.bzl", "utf8_range_deps")
utf8_range_deps()
http_archive(
name = "lua",
build_file = "//bazel:lua.BUILD",

@ -28,6 +28,14 @@ def upb_deps():
patches = ["@upb//bazel:protobuf.patch"],
)
maybe(
_github_archive,
name = "utf8_range",
repo = "https://github.com/protocolbuffers/utf8_range",
commit = "de0b4a8ff9b5d4c98108bdfe723291a33c52c54f",
sha256 = "5da960e5e5d92394c809629a03af3c7709d2d3d0ca731dacb3a9fb4bf28f7702",
)
rules_python_version = "0.12.0" # Latest @ August 31, 2022
maybe(

@ -99,7 +99,7 @@ sh_test(
":copy_protos",
":gen_cmakelists",
"//:cmake_files",
"//third_party/utf8_range:cmake_files",
"@utf8_range//:utf8_range_srcs",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)

@ -51,6 +51,8 @@ endif()
include_directories(..)
include_directories(../cmake)
include_directories(../third_party/utf8_range)
include_directories(../external/utf8_range)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(APPLE)
@ -288,7 +290,7 @@ target_link_libraries(decode_internal INTERFACE
arena_internal
port
table_internal
/third_party/utf8_range)
utf8_range)
add_library(encode_internal INTERFACE)
target_link_libraries(encode_internal INTERFACE
port)

@ -227,6 +227,9 @@ class WorkspaceFileFunctions(object):
def protobuf_deps(self):
pass
def utf8_range_deps(self):
pass
def pip_install(self, **kwargs):
pass
@ -316,6 +319,8 @@ class Converter(object):
include_directories(..)
include_directories(../cmake)
include_directories(../third_party/utf8_range)
include_directories(../external/utf8_range)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(APPLE)

@ -0,0 +1 @@
Subproject commit 72c943dea2b9240cd09efde15191e144bc7c7d38

@ -36,7 +36,7 @@
#include "upb/mem/arena_internal.h"
#include "upb/message/internal.h"
#include "upb/wire/decode.h"
#include "third_party/utf8_range/utf8_range.h"
#include "utf8_range.h"
// Must be last.
#include "upb/port/def.inc"

Loading…
Cancel
Save