chromium/third_party/private-join-and-compute/src/BUILD.gn

config("library_impl_config") {
  # Build targets that contain private-join-and-compute implementation need this
  # macro to be defined in order to correctly export symbols when is_component_build
  # is true.
  # For more info see: base/private_join_and_compute_export.h.
  defines = [ "IS_PRIVATE_COMPUTE_LIBRARY_IMPL" ]
}

config("private_join_and_compute_config") {
  include_dirs = [ "//third_party/boringssl/src/include" ]
  defines = []
  if (is_win) {
    defines += [ "PRIVATE_COMPUTE_WIN" ]
  }
  if (is_component_build) {
    defines += [
      # Build targets inside private-join-and-compute will need this macro to
      # be defined in order to correctly export symbols when is_component_build
      # is true.
      # For more info see: base/private_join_and_compute_export.h.
      "PRIVATE_COMPUTE_ENABLE_SYMBOL_EXPORT",
    ]
  }
}

component("ec_commutative_cipher") {
  public = [
    "//third_party/private-join-and-compute/base/private_join_and_compute_export.h",
    "crypto/context.h",
    "crypto/ec_commutative_cipher.h",
    "crypto/ec_group.h",
    "crypto/ec_point.h",
  ]
  sources = [
    "chromium_patch.h",
    "crypto/big_num.cc",
    "crypto/big_num.h",
    "crypto/context.cc",
    "crypto/ec_commutative_cipher.cc",
    "crypto/ec_group.cc",
    "crypto/ec_point.cc",
    "crypto/openssl.inc",
    "util/canonical_errors.cc",
    "util/canonical_errors.h",
    "util/status.h",
    "util/status.inc",
    "util/status_macros.h",
    "util/statusor.h",
  ]
  deps = [
    "//base",
    "//third_party/boringssl",
  ]
  public_deps = [ "//third_party/abseil-cpp:absl" ]

  configs += [
    "//build/config/compiler:no_chromium_code",
    ":library_impl_config",
  ]

  public_configs = [ ":private_join_and_compute_config" ]
}