load("@fbsource//tools/build_defs/dirsync:fb_dirsync_cpp_library.bzl", "fb_dirsync_cpp_library")

oncall("fbcode_entropy_wardens_folly")

# Here are rules which conditionally provide exported-deps on other libraries,
# encapsulating the conditional logic via select's.
#
# This enables other rules across folly which may need these deps to extract the
# complexity to here and to take simple deps on the rules here.
fb_dirsync_cpp_library(
    name = "libdwarf",
    exported_deps = [
        "fbsource//third-party/libdwarf:dwarf",
    ],
)

fb_dirsync_cpp_library(
    name = "libunwind",
    exported_deps = select({
        "DEFAULT": [],
        "ovr_config//os:linux": [
            ":libunwind-linux",
        ],
    }),
)

fb_dirsync_cpp_library(
    name = "libunwind-linux",
    exported_deps = [
        "fbsource//third-party/libunwind:unwind",
    ],
)
