load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
load("@fbsource//xplat/folly:defs.bzl", "folly_xplat_library")
load("@fbsource//xplat/pfh/triage_InfrastructureSupermoduleOptou:DEFS.bzl", "triage_InfrastructureSupermoduleOptou")

oncall("fbcode_entropy_wardens_folly")

# xplat build rules

non_fbcode_target(
    _kind = folly_xplat_library,
    name = "hazptr_lock_free_lifo",
    feature = triage_InfrastructureSupermoduleOptou,
    raw_headers = [
        "HazptrLockFreeLIFO.h",
    ],
    deps = [
        "//xplat/folly/synchronization:hazptr",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_library,
    name = "hazptr_swmr_set",
    feature = triage_InfrastructureSupermoduleOptou,
    raw_headers = [
        "HazptrSWMRSet.h",
    ],
    deps = [
        "//xplat/folly/synchronization:hazptr",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_library,
    name = "hazptr_wide_cas",
    feature = triage_InfrastructureSupermoduleOptou,
    raw_headers = [
        "HazptrWideCAS.h",
    ],
    deps = [
        "//xplat/folly/synchronization:hazptr",
    ],
)

# fbcode build rules

fbcode_target(
    _kind = cpp_library,
    name = "hazptr_lock_free_lifo",
    headers = ["HazptrLockFreeLIFO.h"],
    exported_deps = [
        "//folly/synchronization:hazptr",
    ],
)

fbcode_target(
    _kind = cpp_library,
    name = "hazptr_swmr_set",
    headers = ["HazptrSWMRSet.h"],
    exported_deps = [
        "//folly/synchronization:hazptr",
    ],
)

fbcode_target(
    _kind = cpp_library,
    name = "hazptr_wide_cas",
    headers = ["HazptrWideCAS.h"],
    exported_deps = [
        "//folly/synchronization:hazptr",
    ],
)
