BUILD 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  1. # Bazel (https://bazel.build/) BUILD file for Protobuf.
  2. load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
  3. load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test", "objc_library", native_cc_proto_library = "cc_proto_library")
  4. load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain", "proto_library")
  5. load("@rules_python//python:defs.bzl", "py_library")
  6. load(":cc_proto_blacklist_test.bzl", "cc_proto_blacklist_test")
  7. licenses(["notice"])
  8. exports_files(["LICENSE"])
  9. ################################################################################
  10. # build configuration
  11. ################################################################################
  12. # TODO(yannic): Remove in 3.14.0.
  13. string_flag(
  14. name = "incompatible_use_com_google_googletest",
  15. build_setting_default = "true",
  16. values = ["true", "false"]
  17. )
  18. config_setting(
  19. name = "use_com_google_googletest",
  20. flag_values = {
  21. "//:incompatible_use_com_google_googletest": "true"
  22. },
  23. )
  24. GTEST = select({
  25. "//:use_com_google_googletest": [
  26. "@com_google_googletest//:gtest",
  27. ],
  28. "//conditions:default": [
  29. "//external:gtest",
  30. ],
  31. })
  32. GTEST_MAIN = select({
  33. "//:use_com_google_googletest": [
  34. "@com_google_googletest//:gtest_main",
  35. ],
  36. "//conditions:default": [
  37. "//external:gtest_main",
  38. ],
  39. })
  40. ################################################################################
  41. # ZLIB configuration
  42. ################################################################################
  43. ZLIB_DEPS = ["@zlib//:zlib"]
  44. ################################################################################
  45. # Protobuf Runtime Library
  46. ################################################################################
  47. MSVC_COPTS = [
  48. "/DHAVE_PTHREAD",
  49. "/wd4018", # -Wno-sign-compare
  50. "/wd4065", # switch statement contains 'default' but no 'case' labels
  51. "/wd4146", # unary minus operator applied to unsigned type, result still unsigned
  52. "/wd4244", # 'conversion' conversion from 'type1' to 'type2', possible loss of data
  53. "/wd4251", # 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
  54. "/wd4267", # 'var' : conversion from 'size_t' to 'type', possible loss of data
  55. "/wd4305", # 'identifier' : truncation from 'type1' to 'type2'
  56. "/wd4307", # 'operator' : integral constant overflow
  57. "/wd4309", # 'conversion' : truncation of constant value
  58. "/wd4334", # 'operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  59. "/wd4355", # 'this' : used in base member initializer list
  60. "/wd4506", # no definition for inline function 'function'
  61. "/wd4514", # -Wno-unused-function
  62. "/wd4800", # 'type' : forcing value to bool 'true' or 'false' (performance warning)
  63. "/wd4996", # The compiler encountered a deprecated declaration.
  64. ]
  65. COPTS = select({
  66. ":msvc": MSVC_COPTS,
  67. "//conditions:default": [
  68. "-DHAVE_PTHREAD",
  69. "-DHAVE_ZLIB",
  70. "-Woverloaded-virtual",
  71. "-Wno-sign-compare",
  72. "-Wno-unused-function",
  73. # Prevents ISO C++ const string assignment warnings for pyext sources.
  74. "-Wno-write-strings",
  75. "-Wno-deprecated-declarations",
  76. ],
  77. })
  78. load(":compiler_config_setting.bzl", "create_compiler_config_setting")
  79. create_compiler_config_setting(
  80. name = "msvc",
  81. value = "msvc-cl",
  82. visibility = [
  83. # Public, but Protobuf only visibility.
  84. "//:__subpackages__",
  85. ],
  86. )
  87. config_setting(
  88. name = "android",
  89. values = {
  90. "crosstool_top": "//external:android/crosstool",
  91. },
  92. visibility = [
  93. # Public, but Protobuf only visibility.
  94. "//:__subpackages__",
  95. ],
  96. )
  97. config_setting(
  98. name = "android-libcpp",
  99. values = {
  100. "crosstool_top": "@androidndk//:toolchain-libcpp",
  101. },
  102. visibility = [
  103. # Public, but Protobuf only visibility.
  104. "//:__subpackages__",
  105. ],
  106. )
  107. config_setting(
  108. name = "android-gnu-libstdcpp",
  109. values = {
  110. "crosstool_top": "@androidndk//:toolchain-gnu-libstdcpp",
  111. },
  112. visibility = [
  113. # Public, but Protobuf only visibility.
  114. "//:__subpackages__",
  115. ],
  116. )
  117. # Android and MSVC builds do not need to link in a separate pthread library.
  118. LINK_OPTS = select({
  119. ":android": [],
  120. ":android-libcpp": [],
  121. ":android-gnu-libstdcpp": [],
  122. ":msvc": [
  123. # Suppress linker warnings about files with no symbols defined.
  124. "-ignore:4221",
  125. ],
  126. "//conditions:default": [
  127. "-lpthread",
  128. "-lm",
  129. ],
  130. })
  131. load(
  132. ":protobuf.bzl",
  133. "adapt_proto_library",
  134. "cc_proto_library",
  135. "internal_copied_filegroup",
  136. "internal_gen_well_known_protos_java",
  137. "internal_protobuf_py_tests",
  138. "py_proto_library",
  139. )
  140. cc_library(
  141. name = "protobuf_lite",
  142. srcs = [
  143. # AUTOGEN(protobuf_lite_srcs)
  144. "src/google/protobuf/any_lite.cc",
  145. "src/google/protobuf/arena.cc",
  146. "src/google/protobuf/arenastring.cc",
  147. "src/google/protobuf/extension_set.cc",
  148. "src/google/protobuf/generated_enum_util.cc",
  149. "src/google/protobuf/generated_message_table_driven_lite.cc",
  150. "src/google/protobuf/generated_message_util.cc",
  151. "src/google/protobuf/implicit_weak_message.cc",
  152. "src/google/protobuf/io/coded_stream.cc",
  153. "src/google/protobuf/io/io_win32.cc",
  154. "src/google/protobuf/io/strtod.cc",
  155. "src/google/protobuf/io/zero_copy_stream.cc",
  156. "src/google/protobuf/io/zero_copy_stream_impl.cc",
  157. "src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
  158. "src/google/protobuf/map.cc",
  159. "src/google/protobuf/message_lite.cc",
  160. "src/google/protobuf/parse_context.cc",
  161. "src/google/protobuf/repeated_field.cc",
  162. "src/google/protobuf/stubs/bytestream.cc",
  163. "src/google/protobuf/stubs/common.cc",
  164. "src/google/protobuf/stubs/int128.cc",
  165. "src/google/protobuf/stubs/status.cc",
  166. "src/google/protobuf/stubs/statusor.cc",
  167. "src/google/protobuf/stubs/stringpiece.cc",
  168. "src/google/protobuf/stubs/stringprintf.cc",
  169. "src/google/protobuf/stubs/structurally_valid.cc",
  170. "src/google/protobuf/stubs/strutil.cc",
  171. "src/google/protobuf/stubs/time.cc",
  172. "src/google/protobuf/wire_format_lite.cc",
  173. ],
  174. hdrs = glob([
  175. "src/google/protobuf/**/*.h",
  176. "src/google/protobuf/**/*.inc",
  177. ]),
  178. copts = COPTS,
  179. includes = ["src/"],
  180. linkopts = LINK_OPTS,
  181. visibility = ["//visibility:public"],
  182. )
  183. PROTOBUF_DEPS = select({
  184. ":msvc": [],
  185. "//conditions:default": ZLIB_DEPS,
  186. })
  187. cc_library(
  188. name = "protobuf",
  189. srcs = [
  190. # AUTOGEN(protobuf_srcs)
  191. "src/google/protobuf/any.cc",
  192. "src/google/protobuf/any.pb.cc",
  193. "src/google/protobuf/api.pb.cc",
  194. "src/google/protobuf/compiler/importer.cc",
  195. "src/google/protobuf/compiler/parser.cc",
  196. "src/google/protobuf/descriptor.cc",
  197. "src/google/protobuf/descriptor.pb.cc",
  198. "src/google/protobuf/descriptor_database.cc",
  199. "src/google/protobuf/duration.pb.cc",
  200. "src/google/protobuf/dynamic_message.cc",
  201. "src/google/protobuf/empty.pb.cc",
  202. "src/google/protobuf/extension_set_heavy.cc",
  203. "src/google/protobuf/field_mask.pb.cc",
  204. "src/google/protobuf/generated_message_reflection.cc",
  205. "src/google/protobuf/generated_message_table_driven.cc",
  206. "src/google/protobuf/io/gzip_stream.cc",
  207. "src/google/protobuf/io/printer.cc",
  208. "src/google/protobuf/io/tokenizer.cc",
  209. "src/google/protobuf/map_field.cc",
  210. "src/google/protobuf/message.cc",
  211. "src/google/protobuf/reflection_ops.cc",
  212. "src/google/protobuf/service.cc",
  213. "src/google/protobuf/source_context.pb.cc",
  214. "src/google/protobuf/struct.pb.cc",
  215. "src/google/protobuf/stubs/substitute.cc",
  216. "src/google/protobuf/text_format.cc",
  217. "src/google/protobuf/timestamp.pb.cc",
  218. "src/google/protobuf/type.pb.cc",
  219. "src/google/protobuf/unknown_field_set.cc",
  220. "src/google/protobuf/util/delimited_message_util.cc",
  221. "src/google/protobuf/util/field_comparator.cc",
  222. "src/google/protobuf/util/field_mask_util.cc",
  223. "src/google/protobuf/util/internal/datapiece.cc",
  224. "src/google/protobuf/util/internal/default_value_objectwriter.cc",
  225. "src/google/protobuf/util/internal/error_listener.cc",
  226. "src/google/protobuf/util/internal/field_mask_utility.cc",
  227. "src/google/protobuf/util/internal/json_escaping.cc",
  228. "src/google/protobuf/util/internal/json_objectwriter.cc",
  229. "src/google/protobuf/util/internal/json_stream_parser.cc",
  230. "src/google/protobuf/util/internal/object_writer.cc",
  231. "src/google/protobuf/util/internal/proto_writer.cc",
  232. "src/google/protobuf/util/internal/protostream_objectsource.cc",
  233. "src/google/protobuf/util/internal/protostream_objectwriter.cc",
  234. "src/google/protobuf/util/internal/type_info.cc",
  235. "src/google/protobuf/util/internal/type_info_test_helper.cc",
  236. "src/google/protobuf/util/internal/utility.cc",
  237. "src/google/protobuf/util/json_util.cc",
  238. "src/google/protobuf/util/message_differencer.cc",
  239. "src/google/protobuf/util/time_util.cc",
  240. "src/google/protobuf/util/type_resolver_util.cc",
  241. "src/google/protobuf/wire_format.cc",
  242. "src/google/protobuf/wrappers.pb.cc",
  243. ],
  244. hdrs = glob([
  245. "src/**/*.h",
  246. "src/**/*.inc",
  247. ]),
  248. copts = COPTS,
  249. includes = ["src/"],
  250. linkopts = LINK_OPTS,
  251. visibility = ["//visibility:public"],
  252. deps = [":protobuf_lite"] + PROTOBUF_DEPS,
  253. )
  254. # This provides just the header files for use in projects that need to build
  255. # shared libraries for dynamic loading. This target is available until Bazel
  256. # adds native support for such use cases.
  257. # TODO(keveman): Remove this target once the support gets added to Bazel.
  258. cc_library(
  259. name = "protobuf_headers",
  260. hdrs = glob([
  261. "src/**/*.h",
  262. "src/**/*.inc",
  263. ]),
  264. includes = ["src/"],
  265. visibility = ["//visibility:public"],
  266. )
  267. # Map of all well known protos.
  268. # name => (include path, imports)
  269. WELL_KNOWN_PROTO_MAP = {
  270. "any": ("src/google/protobuf/any.proto", []),
  271. "api": (
  272. "src/google/protobuf/api.proto",
  273. [
  274. "source_context",
  275. "type",
  276. ],
  277. ),
  278. "compiler_plugin": (
  279. "src/google/protobuf/compiler/plugin.proto",
  280. ["descriptor"],
  281. ),
  282. "descriptor": ("src/google/protobuf/descriptor.proto", []),
  283. "duration": ("src/google/protobuf/duration.proto", []),
  284. "empty": ("src/google/protobuf/empty.proto", []),
  285. "field_mask": ("src/google/protobuf/field_mask.proto", []),
  286. "source_context": ("src/google/protobuf/source_context.proto", []),
  287. "struct": ("src/google/protobuf/struct.proto", []),
  288. "timestamp": ("src/google/protobuf/timestamp.proto", []),
  289. "type": (
  290. "src/google/protobuf/type.proto",
  291. [
  292. "any",
  293. "source_context",
  294. ],
  295. ),
  296. "wrappers": ("src/google/protobuf/wrappers.proto", []),
  297. }
  298. WELL_KNOWN_PROTOS = [value[0] for value in WELL_KNOWN_PROTO_MAP.values()]
  299. filegroup(
  300. name = "well_known_protos",
  301. srcs = WELL_KNOWN_PROTOS,
  302. visibility = ["//visibility:public"],
  303. )
  304. adapt_proto_library(
  305. name = "cc_wkt_protos_genproto",
  306. deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
  307. visibility = ["//visibility:public"],
  308. )
  309. cc_library(
  310. name = "cc_wkt_protos",
  311. deprecation = "Only for backward compatibility. Do not use.",
  312. visibility = ["//visibility:public"],
  313. )
  314. ################################################################################
  315. # Well Known Types Proto Library Rules
  316. #
  317. # These proto_library rules can be used with one of the language specific proto
  318. # library rules i.e. java_proto_library:
  319. #
  320. # java_proto_library(
  321. # name = "any_java_proto",
  322. # deps = ["@com_google_protobuf//:any_proto],
  323. # )
  324. ################################################################################
  325. [proto_library(
  326. name = proto[0] + "_proto",
  327. srcs = [proto[1][0]],
  328. strip_import_prefix = "src",
  329. visibility = ["//visibility:public"],
  330. deps = [dep + "_proto" for dep in proto[1][1]],
  331. ) for proto in WELL_KNOWN_PROTO_MAP.items()]
  332. [native_cc_proto_library(
  333. name = proto + "_cc_proto",
  334. deps = [proto + "_proto"],
  335. visibility = ["//visibility:private"],
  336. ) for proto in WELL_KNOWN_PROTO_MAP.keys()]
  337. cc_proto_blacklist_test(
  338. name = "cc_proto_blacklist_test",
  339. deps = [proto + "_cc_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
  340. tags = [
  341. # Exclude this target from wildcard expansion (//...). Due to
  342. # https://github.com/bazelbuild/bazel/issues/10590, this test has to
  343. # be nominated using the `@com_google_protobuf//` prefix. We do that,
  344. # e.g., in kokoro/linux/bazel/build.sh.
  345. # See also https://github.com/protocolbuffers/protobuf/pull/7096.
  346. "manual",
  347. ],
  348. )
  349. ################################################################################
  350. # Protocol Buffers Compiler
  351. ################################################################################
  352. cc_library(
  353. name = "protoc_lib",
  354. srcs = [
  355. # AUTOGEN(protoc_lib_srcs)
  356. "src/google/protobuf/compiler/code_generator.cc",
  357. "src/google/protobuf/compiler/command_line_interface.cc",
  358. "src/google/protobuf/compiler/cpp/cpp_enum.cc",
  359. "src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
  360. "src/google/protobuf/compiler/cpp/cpp_extension.cc",
  361. "src/google/protobuf/compiler/cpp/cpp_field.cc",
  362. "src/google/protobuf/compiler/cpp/cpp_file.cc",
  363. "src/google/protobuf/compiler/cpp/cpp_generator.cc",
  364. "src/google/protobuf/compiler/cpp/cpp_helpers.cc",
  365. "src/google/protobuf/compiler/cpp/cpp_map_field.cc",
  366. "src/google/protobuf/compiler/cpp/cpp_message.cc",
  367. "src/google/protobuf/compiler/cpp/cpp_message_field.cc",
  368. "src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc",
  369. "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc",
  370. "src/google/protobuf/compiler/cpp/cpp_service.cc",
  371. "src/google/protobuf/compiler/cpp/cpp_string_field.cc",
  372. "src/google/protobuf/compiler/csharp/csharp_doc_comment.cc",
  373. "src/google/protobuf/compiler/csharp/csharp_enum.cc",
  374. "src/google/protobuf/compiler/csharp/csharp_enum_field.cc",
  375. "src/google/protobuf/compiler/csharp/csharp_field_base.cc",
  376. "src/google/protobuf/compiler/csharp/csharp_generator.cc",
  377. "src/google/protobuf/compiler/csharp/csharp_helpers.cc",
  378. "src/google/protobuf/compiler/csharp/csharp_map_field.cc",
  379. "src/google/protobuf/compiler/csharp/csharp_message.cc",
  380. "src/google/protobuf/compiler/csharp/csharp_message_field.cc",
  381. "src/google/protobuf/compiler/csharp/csharp_primitive_field.cc",
  382. "src/google/protobuf/compiler/csharp/csharp_reflection_class.cc",
  383. "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc",
  384. "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc",
  385. "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc",
  386. "src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc",
  387. "src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc",
  388. "src/google/protobuf/compiler/java/java_context.cc",
  389. "src/google/protobuf/compiler/java/java_doc_comment.cc",
  390. "src/google/protobuf/compiler/java/java_enum.cc",
  391. "src/google/protobuf/compiler/java/java_enum_field.cc",
  392. "src/google/protobuf/compiler/java/java_enum_field_lite.cc",
  393. "src/google/protobuf/compiler/java/java_enum_lite.cc",
  394. "src/google/protobuf/compiler/java/java_extension.cc",
  395. "src/google/protobuf/compiler/java/java_extension_lite.cc",
  396. "src/google/protobuf/compiler/java/java_field.cc",
  397. "src/google/protobuf/compiler/java/java_file.cc",
  398. "src/google/protobuf/compiler/java/java_generator.cc",
  399. "src/google/protobuf/compiler/java/java_generator_factory.cc",
  400. "src/google/protobuf/compiler/java/java_helpers.cc",
  401. "src/google/protobuf/compiler/java/java_map_field.cc",
  402. "src/google/protobuf/compiler/java/java_map_field_lite.cc",
  403. "src/google/protobuf/compiler/java/java_message.cc",
  404. "src/google/protobuf/compiler/java/java_message_builder.cc",
  405. "src/google/protobuf/compiler/java/java_message_builder_lite.cc",
  406. "src/google/protobuf/compiler/java/java_message_field.cc",
  407. "src/google/protobuf/compiler/java/java_message_field_lite.cc",
  408. "src/google/protobuf/compiler/java/java_message_lite.cc",
  409. "src/google/protobuf/compiler/java/java_name_resolver.cc",
  410. "src/google/protobuf/compiler/java/java_primitive_field.cc",
  411. "src/google/protobuf/compiler/java/java_primitive_field_lite.cc",
  412. "src/google/protobuf/compiler/java/java_service.cc",
  413. "src/google/protobuf/compiler/java/java_shared_code_generator.cc",
  414. "src/google/protobuf/compiler/java/java_string_field.cc",
  415. "src/google/protobuf/compiler/java/java_string_field_lite.cc",
  416. "src/google/protobuf/compiler/js/js_generator.cc",
  417. "src/google/protobuf/compiler/js/well_known_types_embed.cc",
  418. "src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
  419. "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
  420. "src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
  421. "src/google/protobuf/compiler/objectivec/objectivec_field.cc",
  422. "src/google/protobuf/compiler/objectivec/objectivec_file.cc",
  423. "src/google/protobuf/compiler/objectivec/objectivec_generator.cc",
  424. "src/google/protobuf/compiler/objectivec/objectivec_helpers.cc",
  425. "src/google/protobuf/compiler/objectivec/objectivec_map_field.cc",
  426. "src/google/protobuf/compiler/objectivec/objectivec_message.cc",
  427. "src/google/protobuf/compiler/objectivec/objectivec_message_field.cc",
  428. "src/google/protobuf/compiler/objectivec/objectivec_oneof.cc",
  429. "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc",
  430. "src/google/protobuf/compiler/php/php_generator.cc",
  431. "src/google/protobuf/compiler/plugin.cc",
  432. "src/google/protobuf/compiler/plugin.pb.cc",
  433. "src/google/protobuf/compiler/python/python_generator.cc",
  434. "src/google/protobuf/compiler/ruby/ruby_generator.cc",
  435. "src/google/protobuf/compiler/subprocess.cc",
  436. "src/google/protobuf/compiler/zip_writer.cc",
  437. ],
  438. copts = COPTS,
  439. includes = ["src/"],
  440. linkopts = LINK_OPTS,
  441. visibility = ["//visibility:public"],
  442. deps = [":protobuf"],
  443. )
  444. cc_binary(
  445. name = "protoc",
  446. srcs = ["src/google/protobuf/compiler/main.cc"],
  447. linkopts = LINK_OPTS,
  448. visibility = ["//visibility:public"],
  449. deps = [":protoc_lib"],
  450. )
  451. ################################################################################
  452. # Tests
  453. ################################################################################
  454. RELATIVE_LITE_TEST_PROTOS = [
  455. # AUTOGEN(lite_test_protos)
  456. "google/protobuf/map_lite_unittest.proto",
  457. "google/protobuf/unittest_import_lite.proto",
  458. "google/protobuf/unittest_import_public_lite.proto",
  459. "google/protobuf/unittest_lite.proto",
  460. ]
  461. LITE_TEST_PROTOS = ["src/" + s for s in RELATIVE_LITE_TEST_PROTOS]
  462. RELATIVE_TEST_PROTOS = [
  463. # AUTOGEN(test_protos)
  464. "google/protobuf/any_test.proto",
  465. "google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto",
  466. "google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto",
  467. "google/protobuf/map_proto2_unittest.proto",
  468. "google/protobuf/map_unittest.proto",
  469. "google/protobuf/unittest.proto",
  470. "google/protobuf/unittest_arena.proto",
  471. "google/protobuf/unittest_custom_options.proto",
  472. "google/protobuf/unittest_drop_unknown_fields.proto",
  473. "google/protobuf/unittest_embed_optimize_for.proto",
  474. "google/protobuf/unittest_empty.proto",
  475. "google/protobuf/unittest_enormous_descriptor.proto",
  476. "google/protobuf/unittest_import.proto",
  477. "google/protobuf/unittest_import_public.proto",
  478. "google/protobuf/unittest_lazy_dependencies.proto",
  479. "google/protobuf/unittest_lazy_dependencies_custom_option.proto",
  480. "google/protobuf/unittest_lazy_dependencies_enum.proto",
  481. "google/protobuf/unittest_lite_imports_nonlite.proto",
  482. "google/protobuf/unittest_mset.proto",
  483. "google/protobuf/unittest_mset_wire_format.proto",
  484. "google/protobuf/unittest_no_field_presence.proto",
  485. "google/protobuf/unittest_no_generic_services.proto",
  486. "google/protobuf/unittest_optimize_for.proto",
  487. "google/protobuf/unittest_preserve_unknown_enum.proto",
  488. "google/protobuf/unittest_preserve_unknown_enum2.proto",
  489. "google/protobuf/unittest_proto3.proto",
  490. "google/protobuf/unittest_proto3_arena.proto",
  491. "google/protobuf/unittest_proto3_arena_lite.proto",
  492. "google/protobuf/unittest_proto3_lite.proto",
  493. "google/protobuf/unittest_proto3_optional.proto",
  494. "google/protobuf/unittest_well_known_types.proto",
  495. "google/protobuf/util/internal/testdata/anys.proto",
  496. "google/protobuf/util/internal/testdata/books.proto",
  497. "google/protobuf/util/internal/testdata/default_value.proto",
  498. "google/protobuf/util/internal/testdata/default_value_test.proto",
  499. "google/protobuf/util/internal/testdata/field_mask.proto",
  500. "google/protobuf/util/internal/testdata/maps.proto",
  501. "google/protobuf/util/internal/testdata/oneofs.proto",
  502. "google/protobuf/util/internal/testdata/proto3.proto",
  503. "google/protobuf/util/internal/testdata/struct.proto",
  504. "google/protobuf/util/internal/testdata/timestamp_duration.proto",
  505. "google/protobuf/util/internal/testdata/wrappers.proto",
  506. "google/protobuf/util/json_format.proto",
  507. "google/protobuf/util/json_format_proto3.proto",
  508. "google/protobuf/util/message_differencer_unittest.proto",
  509. ]
  510. TEST_PROTOS = ["src/" + s for s in RELATIVE_TEST_PROTOS]
  511. cc_proto_library(
  512. name = "cc_test_protos",
  513. srcs = LITE_TEST_PROTOS + TEST_PROTOS,
  514. include = "src",
  515. default_runtime = ":protobuf",
  516. protoc = ":protoc",
  517. deps = [":cc_wkt_protos"],
  518. )
  519. COMMON_TEST_SRCS = [
  520. # AUTOGEN(common_test_srcs)
  521. "src/google/protobuf/arena_test_util.cc",
  522. "src/google/protobuf/map_test_util.inc",
  523. "src/google/protobuf/test_util.cc",
  524. "src/google/protobuf/test_util.inc",
  525. "src/google/protobuf/testing/file.cc",
  526. "src/google/protobuf/testing/googletest.cc",
  527. ]
  528. cc_binary(
  529. name = "test_plugin",
  530. srcs = [
  531. # AUTOGEN(test_plugin_srcs)
  532. "src/google/protobuf/compiler/mock_code_generator.cc",
  533. "src/google/protobuf/compiler/test_plugin.cc",
  534. "src/google/protobuf/testing/file.cc",
  535. ],
  536. deps = [
  537. ":protobuf",
  538. ":protoc_lib",
  539. ] + GTEST,
  540. )
  541. cc_test(
  542. name = "win32_test",
  543. srcs = ["src/google/protobuf/io/io_win32_unittest.cc"],
  544. tags = [
  545. "manual",
  546. "windows",
  547. ],
  548. deps = [
  549. ":protobuf_lite",
  550. ] + GTEST_MAIN,
  551. )
  552. cc_test(
  553. name = "protobuf_test",
  554. srcs = COMMON_TEST_SRCS + [
  555. # AUTOGEN(test_srcs)
  556. "src/google/protobuf/any_test.cc",
  557. "src/google/protobuf/arena_unittest.cc",
  558. "src/google/protobuf/arenastring_unittest.cc",
  559. "src/google/protobuf/compiler/annotation_test_util.cc",
  560. "src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc",
  561. "src/google/protobuf/compiler/cpp/cpp_move_unittest.cc",
  562. "src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc",
  563. "src/google/protobuf/compiler/cpp/cpp_unittest.cc",
  564. "src/google/protobuf/compiler/cpp/cpp_unittest.inc",
  565. "src/google/protobuf/compiler/cpp/metadata_test.cc",
  566. "src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc",
  567. "src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc",
  568. "src/google/protobuf/compiler/importer_unittest.cc",
  569. "src/google/protobuf/compiler/java/java_doc_comment_unittest.cc",
  570. "src/google/protobuf/compiler/java/java_plugin_unittest.cc",
  571. "src/google/protobuf/compiler/mock_code_generator.cc",
  572. "src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc",
  573. "src/google/protobuf/compiler/parser_unittest.cc",
  574. "src/google/protobuf/compiler/python/python_plugin_unittest.cc",
  575. "src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc",
  576. "src/google/protobuf/descriptor_database_unittest.cc",
  577. "src/google/protobuf/descriptor_unittest.cc",
  578. "src/google/protobuf/drop_unknown_fields_test.cc",
  579. "src/google/protobuf/dynamic_message_unittest.cc",
  580. "src/google/protobuf/extension_set_unittest.cc",
  581. "src/google/protobuf/generated_message_reflection_unittest.cc",
  582. "src/google/protobuf/io/coded_stream_unittest.cc",
  583. "src/google/protobuf/io/io_win32_unittest.cc",
  584. "src/google/protobuf/io/printer_unittest.cc",
  585. "src/google/protobuf/io/tokenizer_unittest.cc",
  586. "src/google/protobuf/io/zero_copy_stream_unittest.cc",
  587. "src/google/protobuf/map_field_test.cc",
  588. "src/google/protobuf/map_test.cc",
  589. "src/google/protobuf/message_unittest.cc",
  590. "src/google/protobuf/message_unittest.inc",
  591. "src/google/protobuf/no_field_presence_test.cc",
  592. "src/google/protobuf/preserve_unknown_enum_test.cc",
  593. "src/google/protobuf/proto3_arena_lite_unittest.cc",
  594. "src/google/protobuf/proto3_arena_unittest.cc",
  595. "src/google/protobuf/proto3_lite_unittest.cc",
  596. "src/google/protobuf/proto3_lite_unittest.inc",
  597. "src/google/protobuf/reflection_ops_unittest.cc",
  598. "src/google/protobuf/repeated_field_reflection_unittest.cc",
  599. "src/google/protobuf/repeated_field_unittest.cc",
  600. "src/google/protobuf/stubs/bytestream_unittest.cc",
  601. "src/google/protobuf/stubs/common_unittest.cc",
  602. "src/google/protobuf/stubs/int128_unittest.cc",
  603. "src/google/protobuf/stubs/status_test.cc",
  604. "src/google/protobuf/stubs/statusor_test.cc",
  605. "src/google/protobuf/stubs/stringpiece_unittest.cc",
  606. "src/google/protobuf/stubs/stringprintf_unittest.cc",
  607. "src/google/protobuf/stubs/structurally_valid_unittest.cc",
  608. "src/google/protobuf/stubs/strutil_unittest.cc",
  609. "src/google/protobuf/stubs/template_util_unittest.cc",
  610. "src/google/protobuf/stubs/time_test.cc",
  611. "src/google/protobuf/text_format_unittest.cc",
  612. "src/google/protobuf/unknown_field_set_unittest.cc",
  613. "src/google/protobuf/util/delimited_message_util_test.cc",
  614. "src/google/protobuf/util/field_comparator_test.cc",
  615. "src/google/protobuf/util/field_mask_util_test.cc",
  616. "src/google/protobuf/util/internal/default_value_objectwriter_test.cc",
  617. "src/google/protobuf/util/internal/json_objectwriter_test.cc",
  618. "src/google/protobuf/util/internal/json_stream_parser_test.cc",
  619. "src/google/protobuf/util/internal/protostream_objectsource_test.cc",
  620. "src/google/protobuf/util/internal/protostream_objectwriter_test.cc",
  621. "src/google/protobuf/util/internal/type_info_test_helper.cc",
  622. "src/google/protobuf/util/json_util_test.cc",
  623. "src/google/protobuf/util/message_differencer_unittest.cc",
  624. "src/google/protobuf/util/time_util_test.cc",
  625. "src/google/protobuf/util/type_resolver_util_test.cc",
  626. "src/google/protobuf/well_known_types_unittest.cc",
  627. "src/google/protobuf/wire_format_unittest.cc",
  628. ] + select({
  629. "//conditions:default": [
  630. # AUTOGEN(non_msvc_test_srcs)
  631. "src/google/protobuf/compiler/command_line_interface_unittest.cc",
  632. ],
  633. ":msvc": [],
  634. }),
  635. copts = COPTS,
  636. data = [
  637. ":test_plugin",
  638. ] + glob([
  639. "src/google/protobuf/**/*",
  640. # Files for csharp_bootstrap_unittest.cc.
  641. "conformance/**/*",
  642. "csharp/src/**/*",
  643. ]),
  644. includes = [
  645. "src/",
  646. ],
  647. linkopts = LINK_OPTS,
  648. deps = [
  649. ":cc_test_protos",
  650. ":protobuf",
  651. ":protoc_lib",
  652. ] + PROTOBUF_DEPS + GTEST_MAIN,
  653. )
  654. ################################################################################
  655. # Java support
  656. ################################################################################
  657. internal_gen_well_known_protos_java(
  658. name = "gen_well_known_protos_java",
  659. deps = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
  660. visibility = [
  661. "//java:__subpackages__",
  662. ],
  663. )
  664. alias(
  665. name = "protobuf_java",
  666. actual = "//java/core",
  667. visibility = ["//visibility:public"],
  668. )
  669. alias(
  670. name = "protobuf_javalite",
  671. actual = "//java/lite",
  672. visibility = ["//visibility:public"],
  673. )
  674. alias(
  675. name = "protobuf_java_util",
  676. actual = "//java/util",
  677. visibility = ["//visibility:public"],
  678. )
  679. alias(
  680. name = "java_toolchain",
  681. actual = "//java/core:toolchain",
  682. visibility = ["//visibility:public"],
  683. )
  684. alias(
  685. name = "javalite_toolchain",
  686. actual = "//java/lite:toolchain",
  687. visibility = ["//visibility:public"],
  688. )
  689. ################################################################################
  690. # Python support
  691. ################################################################################
  692. py_library(
  693. name = "python_srcs",
  694. srcs = glob(
  695. [
  696. "python/google/protobuf/**/*.py",
  697. ],
  698. exclude = [
  699. "python/google/protobuf/internal/*_test.py",
  700. "python/google/protobuf/internal/test_util.py",
  701. ],
  702. ),
  703. imports = ["python"],
  704. srcs_version = "PY2AND3",
  705. )
  706. cc_binary(
  707. name = "python/google/protobuf/internal/_api_implementation.so",
  708. srcs = ["python/google/protobuf/internal/api_implementation.cc"],
  709. copts = COPTS + [
  710. "-DPYTHON_PROTO2_CPP_IMPL_V2",
  711. ],
  712. tags = [
  713. # Exclude this target from wildcard expansion (//...) because it may
  714. # not even be buildable. It will be built if it is needed according
  715. # to :use_fast_cpp_protos.
  716. # https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes
  717. "manual",
  718. ],
  719. linkshared = 1,
  720. linkstatic = 1,
  721. deps = select({
  722. "//conditions:default": [],
  723. ":use_fast_cpp_protos": ["//external:python_headers"],
  724. }),
  725. )
  726. cc_binary(
  727. name = "python/google/protobuf/pyext/_message.so",
  728. srcs = glob([
  729. "python/google/protobuf/pyext/*.cc",
  730. "python/google/protobuf/pyext/*.h",
  731. ]),
  732. copts = COPTS + [
  733. "-DGOOGLE_PROTOBUF_HAS_ONEOF=1",
  734. ] + select({
  735. "//conditions:default": [],
  736. ":allow_oversize_protos": ["-DPROTOBUF_PYTHON_ALLOW_OVERSIZE_PROTOS=1"],
  737. }),
  738. includes = [
  739. "python/",
  740. "src/",
  741. ],
  742. tags = [
  743. # Exclude this target from wildcard expansion (//...) because it may
  744. # not even be buildable. It will be built if it is needed according
  745. # to :use_fast_cpp_protos.
  746. # https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes
  747. "manual",
  748. ],
  749. linkshared = 1,
  750. linkstatic = 1,
  751. deps = [
  752. ":protobuf",
  753. ":proto_api",
  754. ] + select({
  755. "//conditions:default": [],
  756. ":use_fast_cpp_protos": ["//external:python_headers"],
  757. }),
  758. )
  759. config_setting(
  760. name = "use_fast_cpp_protos",
  761. values = {
  762. "define": "use_fast_cpp_protos=true",
  763. },
  764. visibility = [
  765. # Public, but Protobuf only visibility.
  766. "//:__subpackages__",
  767. ],
  768. )
  769. config_setting(
  770. name = "allow_oversize_protos",
  771. values = {
  772. "define": "allow_oversize_protos=true",
  773. },
  774. visibility = [
  775. # Public, but Protobuf only visibility.
  776. "//:__subpackages__",
  777. ],
  778. )
  779. # Copy the builtin proto files from src/google/protobuf to
  780. # python/google/protobuf. This way, the generated Python sources will be in the
  781. # same directory as the Python runtime sources. This is necessary for the
  782. # modules to be imported correctly since they are all part of the same Python
  783. # package.
  784. internal_copied_filegroup(
  785. name = "protos_python",
  786. srcs = WELL_KNOWN_PROTOS,
  787. dest = "python",
  788. strip_prefix = "src",
  789. )
  790. # TODO(dzc): Remove this once py_proto_library can have labels in srcs, in
  791. # which case we can simply add :protos_python in srcs.
  792. COPIED_WELL_KNOWN_PROTOS = ["python/" + s[4:] for s in WELL_KNOWN_PROTOS]
  793. py_proto_library(
  794. name = "protobuf_python",
  795. srcs = COPIED_WELL_KNOWN_PROTOS,
  796. include = "python",
  797. data = select({
  798. "//conditions:default": [],
  799. ":use_fast_cpp_protos": [
  800. ":python/google/protobuf/internal/_api_implementation.so",
  801. ":python/google/protobuf/pyext/_message.so",
  802. ],
  803. }),
  804. default_runtime = "",
  805. protoc = ":protoc",
  806. py_libs = [
  807. ":python_srcs",
  808. "@six//:six",
  809. ],
  810. srcs_version = "PY2AND3",
  811. visibility = ["//visibility:public"],
  812. )
  813. # Copy the test proto files from src/google/protobuf to
  814. # python/google/protobuf. This way, the generated Python sources will be in the
  815. # same directory as the Python runtime sources. This is necessary for the
  816. # modules to be imported correctly by the tests since they are all part of the
  817. # same Python package.
  818. internal_copied_filegroup(
  819. name = "protos_python_test",
  820. srcs = LITE_TEST_PROTOS + TEST_PROTOS,
  821. dest = "python",
  822. strip_prefix = "src",
  823. )
  824. # TODO(dzc): Remove this once py_proto_library can have labels in srcs, in
  825. # which case we can simply add :protos_python_test in srcs.
  826. COPIED_LITE_TEST_PROTOS = ["python/" + s for s in RELATIVE_LITE_TEST_PROTOS]
  827. COPIED_TEST_PROTOS = ["python/" + s for s in RELATIVE_TEST_PROTOS]
  828. py_proto_library(
  829. name = "python_common_test_protos",
  830. srcs = COPIED_LITE_TEST_PROTOS + COPIED_TEST_PROTOS,
  831. include = "python",
  832. default_runtime = "",
  833. protoc = ":protoc",
  834. srcs_version = "PY2AND3",
  835. deps = [":protobuf_python"],
  836. )
  837. py_proto_library(
  838. name = "python_specific_test_protos",
  839. srcs = glob([
  840. "python/google/protobuf/internal/*.proto",
  841. "python/google/protobuf/internal/import_test_package/*.proto",
  842. ]),
  843. include = "python",
  844. default_runtime = ":protobuf_python",
  845. protoc = ":protoc",
  846. srcs_version = "PY2AND3",
  847. deps = [":python_common_test_protos"],
  848. )
  849. py_library(
  850. name = "python_tests",
  851. srcs = glob(
  852. [
  853. "python/google/protobuf/internal/*_test.py",
  854. "python/google/protobuf/internal/test_util.py",
  855. "python/google/protobuf/internal/import_test_package/__init__.py",
  856. ],
  857. ),
  858. imports = ["python"],
  859. srcs_version = "PY2AND3",
  860. deps = [
  861. ":protobuf_python",
  862. ":python_common_test_protos",
  863. ":python_specific_test_protos",
  864. ],
  865. )
  866. internal_protobuf_py_tests(
  867. name = "python_tests_batch",
  868. data = glob([
  869. "src/google/protobuf/**/*",
  870. ]),
  871. modules = [
  872. "descriptor_database_test",
  873. "descriptor_pool_test",
  874. "descriptor_test",
  875. "generator_test",
  876. "json_format_test",
  877. "message_factory_test",
  878. "message_test",
  879. "proto_builder_test",
  880. "reflection_test",
  881. "service_reflection_test",
  882. "symbol_database_test",
  883. "text_encoding_test",
  884. "text_format_test",
  885. "unknown_fields_test",
  886. "wire_format_test",
  887. ],
  888. deps = [":python_tests"],
  889. )
  890. cc_library(
  891. name = "proto_api",
  892. hdrs = ["python/google/protobuf/proto_api.h"],
  893. visibility = ["//visibility:public"],
  894. deps = [
  895. "//external:python_headers",
  896. ],
  897. )
  898. proto_lang_toolchain(
  899. name = "cc_toolchain",
  900. blacklisted_protos = [proto + "_proto" for proto in WELL_KNOWN_PROTO_MAP.keys()],
  901. command_line = "--cpp_out=$(OUT)",
  902. runtime = ":protobuf",
  903. visibility = ["//visibility:public"],
  904. )
  905. alias(
  906. name = "objectivec",
  907. actual = "//objectivec",
  908. visibility = ["//visibility:public"],
  909. )
  910. alias(
  911. name = "protobuf_objc",
  912. actual = "//objectivec",
  913. visibility = ["//visibility:public"],
  914. )
  915. ################################################################################
  916. # Test generated proto support
  917. ################################################################################
  918. genrule(
  919. name = "generated_protos",
  920. srcs = ["src/google/protobuf/unittest_import.proto"],
  921. outs = ["unittest_gen.proto"],
  922. cmd = "cat $(SRCS) | sed 's|google/|src/google/|' > $(OUTS)",
  923. )
  924. proto_library(
  925. name = "generated_protos_proto",
  926. srcs = [
  927. "src/google/protobuf/unittest_import_public.proto",
  928. "unittest_gen.proto",
  929. ],
  930. )
  931. py_proto_library(
  932. name = "generated_protos_py",
  933. srcs = [
  934. "src/google/protobuf/unittest_import_public.proto",
  935. "unittest_gen.proto",
  936. ],
  937. default_runtime = "",
  938. protoc = ":protoc",
  939. )
  940. ################################################################################
  941. # Conformance tests
  942. ################################################################################
  943. proto_library(
  944. name = "test_messages_proto2_proto",
  945. srcs = ["src/google/protobuf/test_messages_proto2.proto"],
  946. visibility = ["//visibility:public"],
  947. )
  948. proto_library(
  949. name = "test_messages_proto3_proto",
  950. srcs = ["src/google/protobuf/test_messages_proto3.proto"],
  951. visibility = ["//visibility:public"],
  952. deps = [
  953. ":any_proto",
  954. ":duration_proto",
  955. ":field_mask_proto",
  956. ":struct_proto",
  957. ":timestamp_proto",
  958. ":wrappers_proto",
  959. ],
  960. )
  961. cc_proto_library(
  962. name = "test_messages_proto2_proto_cc",
  963. srcs = ["src/google/protobuf/test_messages_proto2.proto"],
  964. )
  965. cc_proto_library(
  966. name = "test_messages_proto3_proto_cc",
  967. srcs = ["src/google/protobuf/test_messages_proto3.proto"],
  968. deps = [
  969. ":cc_wkt_protos",
  970. ],
  971. )
  972. proto_library(
  973. name = "conformance_proto",
  974. srcs = ["conformance/conformance.proto"],
  975. visibility = ["//visibility:public"],
  976. )
  977. cc_proto_library(
  978. name = "conformance_proto_cc",
  979. srcs = ["conformance/conformance.proto"],
  980. )
  981. cc_library(
  982. name = "jsoncpp",
  983. srcs = ["conformance/third_party/jsoncpp/jsoncpp.cpp"],
  984. hdrs = ["conformance/third_party/jsoncpp/json.h"],
  985. includes = ["conformance"],
  986. )
  987. cc_library(
  988. name = "conformance_test",
  989. srcs = [
  990. "conformance/conformance_test.cc",
  991. "conformance/conformance_test_runner.cc",
  992. ],
  993. hdrs = [
  994. "conformance/conformance_test.h",
  995. ],
  996. includes = [
  997. "conformance",
  998. "src",
  999. ],
  1000. deps = [":conformance_proto_cc"],
  1001. )
  1002. cc_library(
  1003. name = "binary_json_conformance_suite",
  1004. srcs = ["conformance/binary_json_conformance_suite.cc"],
  1005. hdrs = ["conformance/binary_json_conformance_suite.h"],
  1006. deps = [
  1007. ":conformance_test",
  1008. ":jsoncpp",
  1009. ":test_messages_proto2_proto_cc",
  1010. ":test_messages_proto3_proto_cc",
  1011. ],
  1012. )
  1013. cc_library(
  1014. name = "text_format_conformance_suite",
  1015. srcs = ["conformance/text_format_conformance_suite.cc"],
  1016. hdrs = ["conformance/text_format_conformance_suite.h"],
  1017. deps = [
  1018. ":conformance_test",
  1019. ":test_messages_proto2_proto_cc",
  1020. ":test_messages_proto3_proto_cc",
  1021. ],
  1022. )
  1023. cc_binary(
  1024. name = "conformance_test_runner",
  1025. srcs = ["conformance/conformance_test_main.cc"],
  1026. visibility = ["//visibility:public"],
  1027. deps = [
  1028. ":binary_json_conformance_suite",
  1029. ":conformance_test",
  1030. ":text_format_conformance_suite",
  1031. ],
  1032. )
  1033. sh_test(
  1034. name = "build_files_updated_unittest",
  1035. srcs = [
  1036. "build_files_updated_unittest.sh",
  1037. ],
  1038. data = [
  1039. "BUILD",
  1040. "cmake/extract_includes.bat.in",
  1041. "cmake/libprotobuf.cmake",
  1042. "cmake/libprotobuf-lite.cmake",
  1043. "cmake/libprotoc.cmake",
  1044. "cmake/tests.cmake",
  1045. "src/Makefile.am",
  1046. "update_file_lists.sh",
  1047. ],
  1048. )