| # Copyright 2018 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build_overrides/build.gni") |
| import("//third_party/abseil-cpp/abseil_clients.gni") |
| |
| # Usage of Abseil in Chromium is guarded by an explicit opt-in list, before |
| # adding projects to this list please reach out to cxx@chromium.org and CC: |
| # - https://cs.chromium.org/chromium/src/third_party/abseil-cpp/OWNERS |
| # |
| # More information can be found at: |
| # https://docs.google.com/document/d/1DgS1-A3rzboTLjpf4m1sqkJgWjnY_Ru2dokk1X1vBDU |
| if (build_with_chromium) { |
| visibility = absl_visibility |
| visibility += [ "//third_party/openscreen/*" ] |
| } else { |
| visibility = [ "*" ] |
| } |
| |
| source_set("random") { |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| configs += [ |
| "//build/config/compiler:no_chromium_code", |
| "//third_party/abseil-cpp:absl_default_cflags_cc", |
| ] |
| public_configs = [ "//third_party/abseil-cpp:absl_include_config" ] |
| public = [ |
| "random.h", |
| ] |
| deps = [ |
| ":distributions", |
| ":seed_sequences", |
| "../random/internal:nonsecure_base", |
| "../random/internal:pcg_engine", |
| "../random/internal:pool_urbg", |
| "../random/internal:randen_engine", |
| ] |
| } |
| |
| source_set("distributions") { |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| configs += [ |
| "//build/config/compiler:no_chromium_code", |
| "//third_party/abseil-cpp:absl_default_cflags_cc", |
| ] |
| public_configs = [ "//third_party/abseil-cpp:absl_include_config" ] |
| public = [ |
| "bernoulli_distribution.h", |
| "beta_distribution.h", |
| "discrete_distribution.h", |
| "distribution_format_traits.h", |
| "distributions.h", |
| "exponential_distribution.h", |
| "gaussian_distribution.h", |
| "log_uniform_int_distribution.h", |
| "poisson_distribution.h", |
| "uniform_int_distribution.h", |
| "uniform_real_distribution.h", |
| "zipf_distribution.h", |
| ] |
| sources = [ |
| "discrete_distribution.cc", |
| "gaussian_distribution.cc", |
| ] |
| deps = [ |
| "../base:base_internal", |
| "../base:core_headers", |
| "../meta:type_traits", |
| "../random/internal:distribution_impl", |
| "../random/internal:distributions", |
| "../random/internal:fast_uniform_bits", |
| "../random/internal:fastmath", |
| "../random/internal:iostream_state_saver", |
| "../random/internal:traits", |
| "../random/internal:uniform_helper", |
| "../strings", |
| "../types:span", |
| ] |
| } |
| |
| source_set("seed_gen_exception") { |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| configs += [ |
| "//build/config/compiler:no_chromium_code", |
| "//third_party/abseil-cpp:absl_default_cflags_cc", |
| ] |
| public_configs = [ "//third_party/abseil-cpp:absl_include_config" ] |
| public = [ |
| "seed_gen_exception.h", |
| ] |
| sources = [ |
| "seed_gen_exception.cc", |
| ] |
| deps = [ |
| "../base:config", |
| ] |
| } |
| |
| source_set("seed_sequences") { |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| configs += [ |
| "//build/config/compiler:no_chromium_code", |
| "//third_party/abseil-cpp:absl_default_cflags_cc", |
| ] |
| public_configs = [ "//third_party/abseil-cpp:absl_include_config" ] |
| public = [ |
| "seed_sequences.h", |
| ] |
| sources = [ |
| "seed_sequences.cc", |
| ] |
| deps = [ |
| ":seed_gen_exception", |
| "../container:inlined_vector", |
| "../random/internal:nonsecure_base", |
| "../random/internal:pool_urbg", |
| "../random/internal:salted_seed_seq", |
| "../random/internal:seed_material", |
| "../types:span", |
| ] |
| } |