Added a BUILD file for wyhash.

This will make the build more closely resemble the google3
build.

The CMake output from this is a bit busted, but the build
does succeed.
pull/13171/head
Joshua Haberman 4 years ago
parent a5b5445da6
commit e9b79542ad
  1. 25
      BUILD
  2. 2
      cmake/BUILD
  3. 5
      cmake/CMakeLists.txt
  4. 1
      cmake/make_cmakelists.py
  5. 18
      third_party/wyhash/BUILD

25
BUILD

@ -65,7 +65,6 @@ cc_library(
"upb/table.int.h",
"upb/upb.c",
"upb/upb.int.h",
"third_party/wyhash/wyhash.h",
],
hdrs = [
"upb/decode.h",
@ -75,7 +74,10 @@ cc_library(
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [":port"],
deps = [
":port",
"//third_party/wyhash",
],
)
# Common support routines used by generated code. This library has no
@ -286,12 +288,10 @@ upb_amalgamation(
cc_library(
name = "amalgamation",
srcs = [
"upb.c",
"third_party/wyhash/wyhash.h",
],
srcs = ["upb.c"],
hdrs = ["upb.h"],
copts = UPB_DEFAULT_COPTS,
deps = ["//third_party/wyhash"],
)
upb_amalgamation(
@ -314,13 +314,10 @@ upb_amalgamation(
cc_library(
name = "php_amalgamation",
srcs = [
"php-upb.c",
"third_party/wyhash/wyhash.h",
],
srcs = ["php-upb.c"],
hdrs = ["php-upb.h"],
copts = UPB_DEFAULT_COPTS,
deps = ["//third_party/wyhash"],
)
upb_amalgamation(
@ -342,12 +339,10 @@ upb_amalgamation(
cc_library(
name = "ruby_amalgamation",
srcs = [
"ruby-upb.c",
"third_party/wyhash/wyhash.h",
],
srcs = ["ruby-upb.c"],
hdrs = ["ruby-upb.h"],
copts = UPB_DEFAULT_COPTS,
deps = ["//third_party/wyhash"],
)
exports_files(

@ -28,6 +28,7 @@ genrule(
"//:BUILD",
"//:WORKSPACE",
"//:cmake_files",
"//third_party/wyhash:cmake_files",
":cmake_files",
],
outs = ["generated-in/CMakeLists.txt"],
@ -84,6 +85,7 @@ sh_test(
data = [
":cmake_files",
"//:cmake_files",
"//third_party/wyhash:cmake_files",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)

@ -71,13 +71,13 @@ add_library(upb
../upb/table.int.h
../upb/upb.c
../upb/upb.int.h
../third_party/wyhash/wyhash.h
../upb/decode.h
../upb/encode.h
../upb/upb.h
../upb/upb.hpp)
target_link_libraries(upb
port)
port
/third_party/wyhash)
add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE)
target_link_libraries(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE
table
@ -150,5 +150,6 @@ add_library(upb_json
target_link_libraries(upb_json
upb
upb_pb)
add_library(wyhash INTERFACE)

@ -280,6 +280,7 @@ globs = GetDict(converter)
exec(open("WORKSPACE").read(), GetDict(WorkspaceFileFunctions(converter)))
exec(open("BUILD").read(), GetDict(BuildFileFunctions(converter)))
exec(open("third_party/wyhash/BUILD").read(), GetDict(BuildFileFunctions(converter)))
with open(sys.argv[1], "w") as f:
f.write(converter.convert())

@ -0,0 +1,18 @@
licenses(["unencumbered"])
exports_files(["LICENSE"])
cc_library(
name = "wyhash",
hdrs = ["wyhash.h"],
visibility = ["//:__pkg__"],
)
filegroup(
name = "cmake_files",
srcs = glob([
"**/*",
]),
visibility = ["//cmake:__pkg__"],
)
Loading…
Cancel
Save