2019-04-18 17:51:19 +00:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
2019-11-06 04:19:17 +00:00
|
|
|
|
2022-09-21 00:47:52 +00:00
|
|
|
rocksdb_target_header_template = """# This file \100generated by:
|
2021-01-28 00:19:43 +00:00
|
|
|
#$ python3 buckifier/buckify_rocksdb.py{extra_argv}
|
2019-11-06 04:19:17 +00:00
|
|
|
# --> DO NOT EDIT MANUALLY <--
|
|
|
|
# This file is a Facebook-specific integration for buck builds, so can
|
|
|
|
# only be validated by Facebook employees.
|
2022-02-18 18:59:57 +00:00
|
|
|
load("//rocks/buckifier:defs.bzl", "cpp_library_wrapper","rocks_cpp_library_wrapper","cpp_binary_wrapper","cpp_unittest_wrapper","fancy_bench_wrapper","add_c_test_wrapper")
|
2024-05-26 00:10:12 +00:00
|
|
|
load("@fbcode_macros//build_defs:export_files.bzl", "export_file")
|
2022-02-03 04:38:41 +00:00
|
|
|
|
2017-04-04 23:09:31 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
library_template = """
|
2022-02-18 18:59:57 +00:00
|
|
|
cpp_library_wrapper(name="{name}", srcs=[{srcs}], deps=[{deps}], headers={headers}, link_whole={link_whole}, extra_test_libs={extra_test_libs})
|
2017-04-04 23:09:31 +00:00
|
|
|
"""
|
|
|
|
|
2020-05-17 04:46:21 +00:00
|
|
|
rocksdb_library_template = """
|
2022-02-18 18:59:57 +00:00
|
|
|
rocks_cpp_library_wrapper(name="{name}", srcs=[{srcs}], headers={headers})
|
|
|
|
|
2020-05-17 04:46:21 +00:00
|
|
|
"""
|
|
|
|
|
2022-02-18 18:59:57 +00:00
|
|
|
|
2017-04-04 23:09:31 +00:00
|
|
|
binary_template = """
|
2022-02-18 18:59:57 +00:00
|
|
|
cpp_binary_wrapper(name="{name}", srcs=[{srcs}], deps=[{deps}], extra_preprocessor_flags=[{extra_preprocessor_flags}], extra_bench_libs={extra_bench_libs})
|
2017-04-04 23:09:31 +00:00
|
|
|
"""
|
|
|
|
|
2022-02-18 18:59:57 +00:00
|
|
|
unittests_template = """
|
|
|
|
cpp_unittest_wrapper(name="{test_name}",
|
|
|
|
srcs=["{test_cc}"],
|
|
|
|
deps={deps},
|
|
|
|
extra_compiler_flags={extra_compiler_flags})
|
|
|
|
|
2017-11-15 22:13:39 +00:00
|
|
|
"""
|
|
|
|
|
2022-02-18 18:59:57 +00:00
|
|
|
fancy_bench_template = """
|
2022-03-01 23:09:45 +00:00
|
|
|
fancy_bench_wrapper(suite_name="{name}", binary_to_bench_to_metric_list_map={bench_config}, slow={slow}, expected_runtime={expected_runtime}, sl_iterations={sl_iterations}, regression_threshold={regression_threshold})
|
2017-04-04 23:09:31 +00:00
|
|
|
|
|
|
|
"""
|
2023-10-24 18:46:18 +00:00
|
|
|
|
|
|
|
export_file_template = """
|
|
|
|
export_file(name = "{name}")
|
|
|
|
"""
|