-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upb: create upb/dart/ for Dart FFI code written in C
PiperOrigin-RevId: 594483803
- Loading branch information
1 parent
6e25bb8
commit 56672cd
Showing
4 changed files
with
62 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2009-2021, Google LLC | ||
# All rights reserved. | ||
# | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file or at | ||
# https://developers.google.com/open-source/licenses/bsd | ||
|
||
load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS") | ||
|
||
# begin:google_only | ||
# package(default_applicable_licenses = ["//upb:license"]) | ||
# end:google_only | ||
|
||
# This library contains the upb functions called by the Dart FFI runtime. | ||
cc_library( | ||
name = "libupb", | ||
srcs = [":libupb.so"], | ||
linkstatic = 1, | ||
visibility = ["//third_party/dart/pb_runtime:__pkg__"], | ||
) | ||
|
||
# Weirdly, the Dart ffigen tool needs a cc_binary() target, not a cc_library(). | ||
cc_binary( | ||
name = "libupb.so", | ||
srcs = ["upb_so.c"], | ||
copts = UPB_DEFAULT_COPTS, | ||
linkshared = 1, | ||
linkstatic = 1, | ||
visibility = ["//third_party/dart/pb_runtime:__pkg__"], | ||
deps = [ | ||
"//upb:mem", | ||
"//upb:message", | ||
"//upb:message_accessors", | ||
"//upb:message_compare", | ||
"//upb:message_split64", | ||
"//upb:mini_descriptor", | ||
"//upb:mini_table", | ||
"//upb:port", | ||
"//upb:wire", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Protocol Buffers - Google's data interchange format | ||
// Copyright 2023 Google LLC. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file or at | ||
// https://developers.google.com/open-source/licenses/bsd | ||
|
||
// These headers form a spanning tree for the upb defs needed by the Dart FFI. | ||
|
||
#define UPB_BUILD_API | ||
|
||
// IWYU pragma: begin_exports | ||
#include "third_party/upb/upb/message/accessors_split64.h" | ||
#include "third_party/upb/upb/message/array_split64.h" | ||
#include "third_party/upb/upb/message/compare.h" | ||
#include "third_party/upb/upb/message/map.h" | ||
#include "third_party/upb/upb/message/message.h" | ||
#include "third_party/upb/upb/mini_descriptor/decode.h" | ||
#include "third_party/upb/upb/wire/decode.h" | ||
#include "third_party/upb/upb/wire/encode.h" | ||
// IWYU pragma: end_exports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.