Skip to content

Commit

Permalink
Fixed the build after the merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
haberman committed Oct 29, 2020
1 parent 1cd0cb1 commit e86541a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
20 changes: 15 additions & 5 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,26 @@ cc_library(
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [":port", ":fastdecode"],
deps = [
":fastdecode",
":port",
],
)

cc_library(
name = "fastdecode",
srcs = [
"upb/decode.int.h",
"upb/decode_fast.c",
"upb/decode_fast.h",
"upb/decode.int.h",
"upb/msg.h",
"upb/upb.int.h",
],
deps = [":port", ":table"],
copts = UPB_DEFAULT_COPTS,
deps = [
":port",
":table",
],
)

# Common support routines used by generated code. This library has no
Expand Down Expand Up @@ -189,8 +196,8 @@ cc_library(
cc_library(
name = "table",
hdrs = [
"upb/table.int.h",
"upb/upb.h",
"upb/table.int.h",
"upb/upb.h",
],
visibility = ["//tests:__pkg__"],
deps = [
Expand Down Expand Up @@ -307,6 +314,7 @@ cc_library(
name = "amalgamation",
srcs = ["upb.c"],
hdrs = ["upb.h"],
copts = UPB_DEFAULT_COPTS,
)

upb_amalgamation(
Expand All @@ -332,6 +340,7 @@ cc_library(
name = "php_amalgamation",
srcs = ["php-upb.c"],
hdrs = ["php-upb.h"],
copts = UPB_DEFAULT_COPTS,
)

upb_amalgamation(
Expand All @@ -356,6 +365,7 @@ cc_library(
name = "ruby_amalgamation",
srcs = ["ruby-upb.c"],
hdrs = ["ruby-upb.h"],
copts = UPB_DEFAULT_COPTS,
)

exports_files(
Expand Down
6 changes: 3 additions & 3 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ add_library(upb
../upb/upb.h
../upb/upb.hpp)
target_link_libraries(upb
port
fastdecode)
fastdecode
port)
add_library(fastdecode
../upb/decode.int.h
../upb/decode_fast.c
../upb/decode_fast.h
../upb/decode.int.h
../upb/msg.h
../upb/upb.int.h)
target_link_libraries(fastdecode
Expand Down
2 changes: 1 addition & 1 deletion examples/bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ upb_proto_library(
cc_binary(
name = "test_binary",
srcs = ["test_binary.c"],
deps = [":foo_upbproto"],
copts = ["-std=c99"],
deps = [":foo_upbproto"],
)
2 changes: 1 addition & 1 deletion tests/bindings/lua/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ licenses(["notice"])
cc_test(
name = "test_lua",
srcs = ["main.c"],
copts = UPB_DEFAULT_COPTS,
data = [
"test_upb.lua",
":descriptor_proto_lua",
Expand All @@ -24,7 +25,6 @@ cc_test(
"@com_google_protobuf//:conformance_proto",
"@com_google_protobuf//:descriptor_proto",
],
copts = UPB_DEFAULT_COPTS,
linkstatic = 1,
deps = [
"//upb/bindings/lua:lupb",
Expand Down
4 changes: 2 additions & 2 deletions upb/decode_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static const char *fastdecode_varint64(const char *ptr, uint64_t *val) {
*val += (byte - 1) << 63;
}
done:
__builtin_assume(ptr != NULL);
UPB_ASSUME(ptr != NULL);
return ptr;
}

Expand Down Expand Up @@ -897,7 +897,7 @@ static const char *fastdecode_tosubmsg(upb_decstate *d, const char *ptr,
void *ctx) {
fastdecode_submsgdata *submsg = ctx;
ptr = fastdecode_dispatch(d, ptr, submsg->msg, submsg->layout, 0);
__builtin_assume(ptr != NULL);
UPB_ASSUME(ptr != NULL);
return ptr;
}

Expand Down

0 comments on commit e86541a

Please sign in to comment.