Merge pull request #36264 from wdirons:fix_flatbuffers_link_error
PiperOrigin-RevId: 291844926 Change-Id: Idc4251ef1b014e395a5fedebdc371954d5cb5876
This commit is contained in:
commit
eaa8aca44a
21
third_party/flatbuffers/BUILD.bazel
vendored
21
third_party/flatbuffers/BUILD.bazel
vendored
@ -8,6 +8,17 @@ exports_files(["LICENSE.txt"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
config_setting(
|
||||
name = "freebsd",
|
||||
values = {"cpu": "freebsd"},
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "windows",
|
||||
values = {"cpu": "x64_windows"},
|
||||
)
|
||||
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
|
||||
|
||||
# Public flatc library to compile flatbuffer files at runtime.
|
||||
@ -50,6 +61,16 @@ cc_library(
|
||||
# Public flatc compiler.
|
||||
cc_binary(
|
||||
name = "flatc",
|
||||
linkopts = select({
|
||||
":freebsd": [
|
||||
"-lm",
|
||||
],
|
||||
":windows": [],
|
||||
"//conditions:default": [
|
||||
"-lm",
|
||||
"-ldl",
|
||||
],
|
||||
}),
|
||||
deps = [
|
||||
"@flatbuffers//src:flatc",
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user