BUILD.bazel 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. load(
  2. ":build_defs.bzl",
  3. "CLDEBUGINFO100_GRAMMAR_JSON_FILE",
  4. "COMMON_COPTS",
  5. "DEBUGINFO_GRAMMAR_JSON_FILE",
  6. "SHDEBUGINFO100_GRAMMAR_JSON_FILE",
  7. "TEST_COPTS",
  8. "generate_core_tables",
  9. "generate_enum_string_mapping",
  10. "generate_extinst_lang_headers",
  11. "generate_glsl_tables",
  12. "generate_opencl_tables",
  13. "generate_vendor_tables",
  14. "incompatible_with",
  15. )
  16. package(
  17. default_visibility = ["//visibility:private"],
  18. features = [
  19. "layering_check",
  20. ],
  21. )
  22. licenses(["notice"])
  23. exports_files([
  24. "CHANGES",
  25. "LICENSE",
  26. ])
  27. py_binary(
  28. name = "generate_grammar_tables",
  29. srcs = ["utils/generate_grammar_tables.py"],
  30. )
  31. py_binary(
  32. name = "generate_language_headers",
  33. srcs = ["utils/generate_language_headers.py"],
  34. )
  35. generate_core_tables(version = "unified1")
  36. generate_enum_string_mapping(version = "unified1")
  37. generate_opencl_tables(version = "unified1")
  38. generate_glsl_tables(version = "unified1")
  39. generate_vendor_tables(extension = "spv-amd-shader-explicit-vertex-parameter")
  40. generate_vendor_tables(extension = "spv-amd-shader-trinary-minmax")
  41. generate_vendor_tables(extension = "spv-amd-gcn-shader")
  42. generate_vendor_tables(extension = "spv-amd-shader-ballot")
  43. generate_vendor_tables(extension = "debuginfo")
  44. generate_vendor_tables(extension = "nonsemantic.clspvreflection")
  45. generate_vendor_tables(extension = "nonsemantic.vkspreflection")
  46. generate_vendor_tables(
  47. extension = "opencl.debuginfo.100",
  48. operand_kind_prefix = "CLDEBUG100_",
  49. )
  50. generate_vendor_tables(
  51. extension = "nonsemantic.shader.debuginfo.100",
  52. operand_kind_prefix = "SHDEBUG100_",
  53. )
  54. generate_extinst_lang_headers(
  55. name = "DebugInfo",
  56. grammar = DEBUGINFO_GRAMMAR_JSON_FILE,
  57. )
  58. generate_extinst_lang_headers(
  59. name = "OpenCLDebugInfo100",
  60. grammar = CLDEBUGINFO100_GRAMMAR_JSON_FILE,
  61. )
  62. generate_extinst_lang_headers(
  63. name = "NonSemanticShaderDebugInfo100",
  64. grammar = SHDEBUGINFO100_GRAMMAR_JSON_FILE,
  65. )
  66. py_binary(
  67. name = "generate_registry_tables",
  68. srcs = ["utils/generate_registry_tables.py"],
  69. )
  70. genrule(
  71. name = "generators_inc",
  72. srcs = ["@spirv_headers//:spirv_xml_registry"],
  73. outs = ["generators.inc"],
  74. cmd = "$(location :generate_registry_tables) --xml=$(location @spirv_headers//:spirv_xml_registry) --generator-output=$(location generators.inc)",
  75. cmd_bat = "$(location :generate_registry_tables) --xml=$(location @spirv_headers//:spirv_xml_registry) --generator-output=$(location generators.inc)",
  76. tools = [":generate_registry_tables"],
  77. )
  78. py_binary(
  79. name = "update_build_version",
  80. srcs = ["utils/update_build_version.py"],
  81. )
  82. genrule(
  83. name = "build_version_inc",
  84. srcs = ["CHANGES"],
  85. outs = ["build-version.inc"],
  86. cmd = "SOURCE_DATE_EPOCH=0 $(location :update_build_version) $(location CHANGES) $(location build-version.inc)",
  87. cmd_bat = "set SOURCE_DATE_EPOCH=0 && $(location :update_build_version) $(location CHANGES) $(location build-version.inc)",
  88. tools = [":update_build_version"],
  89. )
  90. # Libraries
  91. cc_library(
  92. name = "spirv_tools",
  93. hdrs = [
  94. "include/spirv-tools/libspirv.h",
  95. "include/spirv-tools/libspirv.hpp",
  96. ],
  97. copts = COMMON_COPTS,
  98. includes = ["include"],
  99. linkstatic = 1,
  100. visibility = ["//visibility:public"],
  101. deps = [
  102. ":spirv_tools_internal",
  103. ],
  104. )
  105. cc_library(
  106. name = "spirv_tools_internal",
  107. srcs = glob([
  108. "source/*.cpp",
  109. "source/util/*.cpp",
  110. "source/val/*.cpp",
  111. ]) + [
  112. ":build_version_inc",
  113. ":gen_core_tables_unified1",
  114. ":gen_enum_string_mapping",
  115. ":gen_extinst_lang_headers_DebugInfo",
  116. ":gen_extinst_lang_headers_NonSemanticShaderDebugInfo100",
  117. ":gen_extinst_lang_headers_OpenCLDebugInfo100",
  118. ":gen_glsl_tables_unified1",
  119. ":gen_opencl_tables_unified1",
  120. ":gen_vendor_tables_debuginfo",
  121. ":gen_vendor_tables_nonsemantic_clspvreflection",
  122. ":gen_vendor_tables_nonsemantic_vkspreflection",
  123. ":gen_vendor_tables_nonsemantic_shader_debuginfo_100",
  124. ":gen_vendor_tables_opencl_debuginfo_100",
  125. ":gen_vendor_tables_spv_amd_gcn_shader",
  126. ":gen_vendor_tables_spv_amd_shader_ballot",
  127. ":gen_vendor_tables_spv_amd_shader_explicit_vertex_parameter",
  128. ":gen_vendor_tables_spv_amd_shader_trinary_minmax",
  129. ":generators_inc",
  130. ],
  131. hdrs = [
  132. "include/spirv-tools/libspirv.h",
  133. "include/spirv-tools/libspirv.hpp",
  134. ":gen_extinst_lang_headers_DebugInfo",
  135. ":gen_extinst_lang_headers_NonSemanticShaderDebugInfo100",
  136. ":gen_extinst_lang_headers_OpenCLDebugInfo100",
  137. ] + glob([
  138. "source/*.h",
  139. "source/util/*.h",
  140. "source/val/*.h",
  141. ]),
  142. copts = COMMON_COPTS,
  143. includes = ["include"],
  144. deps = [
  145. "@spirv_headers//:spirv_common_headers",
  146. "@spirv_headers//:spirv_cpp11_headers",
  147. ],
  148. )
  149. cc_library(
  150. name = "spirv_tools_opt",
  151. hdrs = [
  152. "include/spirv-tools/optimizer.hpp",
  153. ],
  154. copts = COMMON_COPTS,
  155. linkstatic = 1,
  156. visibility = ["//visibility:public"],
  157. deps = [
  158. ":spirv_tools",
  159. ":spirv_tools_opt_internal",
  160. ],
  161. )
  162. cc_library(
  163. name = "spirv_tools_opt_internal",
  164. srcs = glob(["source/opt/*.cpp"]) + [
  165. ":gen_vendor_tables_spv_amd_shader_ballot",
  166. ],
  167. hdrs = glob(["source/opt/*.h"]) + [
  168. "include/spirv-tools/optimizer.hpp",
  169. ],
  170. copts = COMMON_COPTS,
  171. deps = [
  172. ":spirv_tools_internal",
  173. "@spirv_headers//:spirv_common_headers",
  174. "@spirv_headers//:spirv_c_headers",
  175. ],
  176. )
  177. cc_library(
  178. name = "spirv_tools_reduce",
  179. srcs = glob(["source/reduce/*.cpp"]),
  180. hdrs = glob(["source/reduce/*.h"]),
  181. copts = COMMON_COPTS,
  182. deps = [
  183. ":spirv_tools_internal",
  184. ":spirv_tools_opt_internal",
  185. ],
  186. )
  187. cc_library(
  188. name = "spirv_tools_link",
  189. srcs = glob(["source/link/*.cpp"]),
  190. hdrs = ["include/spirv-tools/linker.hpp"],
  191. copts = COMMON_COPTS,
  192. linkstatic = 1,
  193. visibility = ["//visibility:public"],
  194. deps = [
  195. ":spirv_tools_internal",
  196. ":spirv_tools_opt_internal",
  197. ],
  198. )
  199. cc_library(
  200. name = "spirv_tools_lint_internal",
  201. srcs = glob([
  202. "source/lint/*.cpp",
  203. "source/lint/*.h",
  204. ]),
  205. hdrs = ["include/spirv-tools/linter.hpp"] + glob([
  206. "source/lint/*.h",
  207. ]),
  208. copts = COMMON_COPTS,
  209. includes = ["include"],
  210. deps = [
  211. ":spirv_tools_internal",
  212. ":spirv_tools_opt_internal",
  213. ],
  214. )
  215. cc_library(
  216. name = "spirv_tools_lint",
  217. hdrs = ["include/spirv-tools/linter.hpp"],
  218. copts = COMMON_COPTS,
  219. includes = ["include"],
  220. linkstatic = 1,
  221. visibility = ["//visibility:public"],
  222. deps = [
  223. ":spirv_tools",
  224. ":spirv_tools_lint_internal",
  225. ],
  226. )
  227. cc_library(
  228. name = "tools_util",
  229. srcs = glob(["tools/util/*.cpp"]),
  230. hdrs = glob(["tools/util/*.h"]),
  231. copts = COMMON_COPTS,
  232. deps = [":spirv_tools"],
  233. )
  234. cc_library(
  235. name = "tools_io",
  236. hdrs = ["tools/io.h"],
  237. srcs = ["tools/io.cpp"],
  238. copts = COMMON_COPTS,
  239. )
  240. # Tools
  241. cc_binary(
  242. name = "spirv-as",
  243. srcs = [
  244. "tools/as/as.cpp",
  245. ],
  246. copts = COMMON_COPTS,
  247. visibility = ["//visibility:public"],
  248. deps = [
  249. ":spirv_tools_internal",
  250. ":tools_io",
  251. ":tools_util",
  252. ],
  253. )
  254. cc_binary(
  255. name = "spirv-dis",
  256. srcs = [
  257. "tools/dis/dis.cpp",
  258. ],
  259. copts = COMMON_COPTS,
  260. visibility = ["//visibility:public"],
  261. deps = [
  262. ":spirv_tools",
  263. ":tools_io",
  264. ":tools_util",
  265. ],
  266. )
  267. cc_binary(
  268. name = "spirv-objdump",
  269. srcs = [
  270. "tools/objdump/extract_source.cpp",
  271. "tools/objdump/extract_source.h",
  272. "tools/objdump/objdump.cpp",
  273. ],
  274. copts = COMMON_COPTS,
  275. visibility = ["//visibility:public"],
  276. deps = [
  277. ":spirv_tools_internal",
  278. ":spirv_tools_opt_internal",
  279. ":tools_io",
  280. ":tools_util",
  281. "@spirv_headers//:spirv_cpp_headers",
  282. ],
  283. )
  284. cc_binary(
  285. name = "spirv-val",
  286. srcs = [
  287. "tools/val/val.cpp",
  288. ],
  289. copts = COMMON_COPTS,
  290. visibility = ["//visibility:public"],
  291. deps = [
  292. ":spirv_tools_internal",
  293. ":tools_io",
  294. ":tools_util",
  295. ],
  296. )
  297. cc_binary(
  298. name = "spirv-opt",
  299. srcs = [
  300. "tools/opt/opt.cpp",
  301. ],
  302. copts = COMMON_COPTS,
  303. visibility = ["//visibility:public"],
  304. deps = [
  305. ":spirv_tools_internal",
  306. ":spirv_tools_opt_internal",
  307. ":tools_io",
  308. ":tools_util",
  309. ],
  310. )
  311. cc_binary(
  312. name = "spirv-reduce",
  313. srcs = [
  314. "tools/reduce/reduce.cpp",
  315. ],
  316. copts = COMMON_COPTS,
  317. visibility = ["//visibility:public"],
  318. deps = [
  319. ":spirv_tools_internal",
  320. ":spirv_tools_opt_internal",
  321. ":spirv_tools_reduce",
  322. ":tools_io",
  323. ":tools_util",
  324. ],
  325. )
  326. cc_binary(
  327. name = "spirv-link",
  328. srcs = [
  329. "tools/link/linker.cpp",
  330. ],
  331. copts = COMMON_COPTS,
  332. visibility = ["//visibility:public"],
  333. deps = [
  334. ":spirv_tools_internal",
  335. ":spirv_tools_link",
  336. ":tools_io",
  337. ":tools_util",
  338. ],
  339. )
  340. cc_binary(
  341. name = "spirv-lint",
  342. srcs = [
  343. "tools/lint/lint.cpp",
  344. ],
  345. copts = COMMON_COPTS,
  346. visibility = ["//visibility:public"],
  347. deps = [
  348. ":spirv_tools_lint",
  349. ":spirv_tools_opt_internal",
  350. ":tools_io",
  351. ":tools_util",
  352. ],
  353. )
  354. cc_binary(
  355. name = "spirv-cfg",
  356. srcs = [
  357. "tools/cfg/bin_to_dot.cpp",
  358. "tools/cfg/bin_to_dot.h",
  359. "tools/cfg/cfg.cpp",
  360. ],
  361. copts = COMMON_COPTS,
  362. visibility = ["//visibility:public"],
  363. deps = [
  364. ":spirv_tools_internal",
  365. ":tools_io",
  366. ":tools_util",
  367. ],
  368. )
  369. # Unit tests
  370. cc_library(
  371. name = "test_lib",
  372. testonly = 1,
  373. srcs = [
  374. "test/unit_spirv.cpp",
  375. ],
  376. hdrs = [
  377. "test/test_fixture.h",
  378. "test/unit_spirv.h",
  379. ],
  380. copts = TEST_COPTS,
  381. deps = [
  382. ":spirv_tools_internal",
  383. "@googletest//:gtest",
  384. ],
  385. )
  386. # PCH (precompiled header) tests only work when using CMake and MSVC on Windows,
  387. # so they will be skipped in the Bazel builds.
  388. [cc_test(
  389. name = "base_{testcase}_test".format(testcase = f[len("test/"):-len("_test.cpp")]),
  390. size = "small",
  391. srcs = [f],
  392. copts = TEST_COPTS + ["-DTESTING"],
  393. linkstatic = 1,
  394. target_compatible_with = {
  395. "test/timer_test.cpp": incompatible_with(["@bazel_tools//src/conditions:windows"]),
  396. }.get(f, []),
  397. deps = [
  398. "tools_util",
  399. ":spirv_tools_internal",
  400. ":test_lib",
  401. ":tools_io",
  402. "@googletest//:gtest",
  403. "@googletest//:gtest_main",
  404. ],
  405. ) for f in glob(
  406. [
  407. "test/*_test.cpp",
  408. "test/tools/*_test.cpp",
  409. ],
  410. exclude = [
  411. "test/cpp_interface_test.cpp",
  412. "test/pch_test.cpp",
  413. ],
  414. )]
  415. cc_test(
  416. name = "base_cpp_interface_test",
  417. size = "small",
  418. srcs = ["test/cpp_interface_test.cpp"],
  419. linkstatic = 1,
  420. deps = [
  421. ":spirv_tools_opt_internal",
  422. "@googletest//:gtest",
  423. "@googletest//:gtest_main",
  424. "@spirv_headers//:spirv_cpp11_headers",
  425. ],
  426. )
  427. cc_test(
  428. name = "base_ilist_test",
  429. size = "small",
  430. srcs = ["test/util/ilist_test.cpp"],
  431. copts = TEST_COPTS,
  432. linkstatic = 1,
  433. deps = [
  434. ":spirv_tools_internal",
  435. "@googletest//:gtest",
  436. "@googletest//:gtest_main",
  437. ],
  438. )
  439. cc_library(
  440. name = "link_test_lib",
  441. testonly = 1,
  442. hdrs = ["test/link/linker_fixture.h"],
  443. copts = TEST_COPTS,
  444. deps = [
  445. ":spirv_tools_internal",
  446. ":spirv_tools_link",
  447. ":test_lib",
  448. "@effcee//:effcee",
  449. "@re2//:re2",
  450. ],
  451. )
  452. [cc_test(
  453. name = "link_{testcase}_test".format(testcase = f[len("test/link/"):-len("_test.cpp")]),
  454. size = "small",
  455. srcs = [f],
  456. copts = TEST_COPTS,
  457. linkstatic = 1,
  458. deps = [
  459. ":link_test_lib",
  460. "@googletest//:gtest",
  461. "@googletest//:gtest_main",
  462. ],
  463. ) for f in glob(
  464. ["test/link/*_test.cpp"],
  465. )]
  466. [cc_test(
  467. name = "lint_{testcase}_test".format(testcase = f[len("test/lint/"):-len("_test.cpp")]),
  468. size = "small",
  469. srcs = [f],
  470. copts = TEST_COPTS,
  471. linkstatic = 1,
  472. deps = [
  473. ":spirv_tools",
  474. ":spirv_tools_lint_internal",
  475. ":spirv_tools_opt_internal",
  476. "@googletest//:gtest",
  477. "@googletest//:gtest_main",
  478. ],
  479. ) for f in glob(
  480. ["test/lint/*_test.cpp"],
  481. )]
  482. cc_library(
  483. name = "opt_test_lib",
  484. testonly = 1,
  485. srcs = [
  486. "test/opt/pass_utils.cpp",
  487. ],
  488. hdrs = [
  489. "test/opt/assembly_builder.h",
  490. "test/opt/function_utils.h",
  491. "test/opt/module_utils.h",
  492. "test/opt/pass_fixture.h",
  493. "test/opt/pass_utils.h",
  494. ],
  495. copts = TEST_COPTS,
  496. deps = [
  497. ":spirv_tools_internal",
  498. ":spirv_tools_opt_internal",
  499. "@effcee//:effcee",
  500. "@googletest//:gtest",
  501. ],
  502. )
  503. [cc_test(
  504. name = "opt_{testcase}_test".format(testcase = f[len("test/opt/"):-len("_test.cpp")]),
  505. size = "small",
  506. srcs = [f],
  507. copts = TEST_COPTS,
  508. linkstatic = 1,
  509. deps = [
  510. ":opt_test_lib",
  511. ":spirv_tools_internal",
  512. ":spirv_tools_opt_internal",
  513. ":test_lib",
  514. "@effcee//:effcee",
  515. "@googletest//:gtest",
  516. "@googletest//:gtest_main",
  517. ],
  518. ) for f in glob(["test/opt/*_test.cpp"])]
  519. [cc_test(
  520. name = "opt_dom_tree_{testcase}_test".format(testcase = f[len("test/opt/dominator_tree/"):-len(".cpp")]),
  521. size = "small",
  522. srcs = [f],
  523. copts = TEST_COPTS,
  524. linkstatic = 1,
  525. deps = [
  526. ":opt_test_lib",
  527. ":spirv_tools_opt_internal",
  528. "@googletest//:gtest",
  529. "@googletest//:gtest_main",
  530. ],
  531. ) for f in glob(
  532. ["test/opt/dominator_tree/*.cpp"],
  533. exclude = ["test/opt/dominator_tree/pch_test_opt_dom.cpp"],
  534. )]
  535. [cc_test(
  536. name = "opt_loop_{testcase}_test".format(testcase = f[len("test/opt/loop_optimizations/"):-len(".cpp")]),
  537. size = "small",
  538. srcs = [f],
  539. copts = TEST_COPTS,
  540. linkstatic = 1,
  541. deps = [
  542. ":opt_test_lib",
  543. ":spirv_tools",
  544. ":spirv_tools_opt_internal",
  545. "@effcee//:effcee",
  546. "@googletest//:gtest",
  547. "@googletest//:gtest_main",
  548. ],
  549. ) for f in glob(
  550. ["test/opt/loop_optimizations/*.cpp"],
  551. exclude = ["test/opt/loop_optimizations/pch_test_opt_loop.cpp"],
  552. )]
  553. cc_library(
  554. name = "reduce_test_lib",
  555. testonly = 1,
  556. srcs = [
  557. "test/reduce/reduce_test_util.cpp",
  558. ],
  559. hdrs = ["test/reduce/reduce_test_util.h"],
  560. copts = TEST_COPTS,
  561. deps = [
  562. ":spirv_tools",
  563. ":spirv_tools_opt_internal",
  564. ":spirv_tools_reduce",
  565. ":test_lib",
  566. ":tools_io",
  567. "@googletest//:gtest",
  568. ],
  569. )
  570. [cc_test(
  571. name = "reduce_{testcase}_test".format(testcase = f[len("test/reduce/"):-len("_test.cpp")]),
  572. size = "small",
  573. srcs = [f],
  574. copts = TEST_COPTS,
  575. linkstatic = 1,
  576. deps = [
  577. ":reduce_test_lib",
  578. ":spirv_tools_internal",
  579. ":spirv_tools_opt_internal",
  580. ":spirv_tools_reduce",
  581. "@googletest//:gtest_main",
  582. ],
  583. ) for f in glob(["test/reduce/*_test.cpp"])]
  584. [cc_test(
  585. name = "util_{testcase}_test".format(testcase = f[len("test/util/"):-len("_test.cpp")]),
  586. size = "small",
  587. srcs = [f],
  588. copts = TEST_COPTS,
  589. linkstatic = 1,
  590. deps = [
  591. ":spirv_tools_internal",
  592. "@googletest//:gtest",
  593. "@googletest//:gtest_main",
  594. ],
  595. ) for f in glob(["test/util/*_test.cpp"])]
  596. cc_library(
  597. name = "val_test_lib",
  598. testonly = 1,
  599. srcs = [
  600. "test/val/val_code_generator.cpp",
  601. ],
  602. hdrs = [
  603. "test/val/val_code_generator.h",
  604. "test/val/val_fixtures.h",
  605. ],
  606. copts = TEST_COPTS,
  607. deps = [
  608. ":spirv_tools_internal",
  609. ":test_lib",
  610. ],
  611. )
  612. [cc_test(
  613. name = "val_{testcase}_test".format(testcase = f[len("test/val/val_"):-len("_test.cpp")]),
  614. size = "small",
  615. srcs = [f],
  616. copts = TEST_COPTS,
  617. linkstatic = 1,
  618. deps = [
  619. ":spirv_tools_internal",
  620. ":test_lib",
  621. ":val_test_lib",
  622. "@googletest//:gtest",
  623. "@googletest//:gtest_main",
  624. ],
  625. ) for f in glob(
  626. ["test/val/val_*_test.cpp"],
  627. exclude = [
  628. "test/val/val_capability_test.cpp",
  629. "test/val/val_limits_test.cpp",
  630. ],
  631. )]
  632. cc_test(
  633. name = "val_capability_test",
  634. size = "large",
  635. timeout = "long",
  636. srcs = ["test/val/val_capability_test.cpp"],
  637. copts = TEST_COPTS + ["-O3"],
  638. linkstatic = 1,
  639. deps = [
  640. ":spirv_tools_internal",
  641. ":test_lib",
  642. ":val_test_lib",
  643. "@googletest//:gtest",
  644. "@googletest//:gtest_main",
  645. ],
  646. )
  647. cc_test(
  648. name = "val_limits_test",
  649. size = "large",
  650. timeout = "long",
  651. srcs = ["test/val/val_limits_test.cpp"],
  652. copts = TEST_COPTS + [
  653. "-O3",
  654. ],
  655. linkstatic = 1,
  656. deps = [
  657. ":test_lib",
  658. ":val_test_lib",
  659. "@googletest//:gtest",
  660. "@googletest//:gtest_main",
  661. ],
  662. )