tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

BUILD.gn (8265B)


      1 # Copyright 2018 The Chromium Authors
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 import("//third_party/abseil-cpp/absl.gni")
      6 
      7 absl_source_set("atomic_hook") {
      8   public = [ "internal/atomic_hook.h" ]
      9   deps = [
     10     ":config",
     11     ":core_headers",
     12   ]
     13   visibility = [ "//third_party/abseil-cpp/absl/*" ]
     14 }
     15 
     16 absl_source_set("errno_saver") {
     17   public = [ "internal/errno_saver.h" ]
     18   deps = [ ":config" ]
     19   visibility = [ "//third_party/abseil-cpp/absl/*" ]
     20 }
     21 
     22 absl_source_set("log_severity") {
     23   sources = [ "log_severity.cc" ]
     24   public = [ "log_severity.h" ]
     25   deps = [
     26     ":config",
     27     ":core_headers",
     28   ]
     29 }
     30 
     31 absl_source_set("no_destructor") {
     32   public = [ "no_destructor.h" ]
     33   deps = [
     34     ":config",
     35     ":nullability",
     36   ]
     37 }
     38 
     39 absl_source_set("nullability") {
     40   sources = [ "internal/nullability_impl.h" ]
     41   public = [ "nullability.h" ]
     42   deps = [
     43     ":config",
     44     ":core_headers",
     45     "//third_party/abseil-cpp/absl/meta:type_traits",
     46   ]
     47 }
     48 
     49 absl_source_set("raw_logging_internal") {
     50   sources = [ "internal/raw_logging.cc" ]
     51   public = [ "internal/raw_logging.h" ]
     52   deps = [
     53     ":atomic_hook",
     54     ":config",
     55     ":core_headers",
     56     ":errno_saver",
     57     ":log_severity",
     58   ]
     59   visibility = [
     60     "//third_party/abseil-cpp:absl_component_deps",
     61     "//third_party/abseil-cpp/absl/*",
     62   ]
     63 }
     64 
     65 absl_source_set("spinlock_wait") {
     66   sources = [
     67     "internal/spinlock_akaros.inc",
     68     "internal/spinlock_linux.inc",
     69     "internal/spinlock_posix.inc",
     70     "internal/spinlock_wait.cc",
     71     "internal/spinlock_win32.inc",
     72   ]
     73   public = [ "internal/spinlock_wait.h" ]
     74   deps = [
     75     ":base_internal",
     76     ":core_headers",
     77     ":errno_saver",
     78   ]
     79   visibility = [ "//third_party/abseil-cpp/absl/base:*" ]
     80 }
     81 
     82 absl_source_set("config") {
     83   public = [
     84     "config.h",
     85     "options.h",
     86     "policy_checks.h",
     87   ]
     88 }
     89 
     90 absl_source_set("cycleclock_internal") {
     91   public = [
     92     "internal/cycleclock_config.h",
     93     "internal/unscaledcycleclock_config.h",
     94   ]
     95   visibility = [ "//third_party/abseil-cpp/absl/*" ]
     96   deps = [
     97     ":base_internal",
     98     ":config",
     99   ]
    100 }
    101 
    102 absl_source_set("dynamic_annotations") {
    103   public = [ "dynamic_annotations.h" ]
    104 
    105   # Abseil's dynamic annotations are only visible inside Abseil because
    106   # their usage is deprecated in Chromium (see README.chromium for more info).
    107   visibility = [
    108     "//third_party/abseil-cpp:absl_component_deps",
    109     "//third_party/abseil-cpp/absl/*",
    110   ]
    111   deps = [
    112     ":config",
    113     ":core_headers",
    114   ]
    115 }
    116 
    117 absl_source_set("core_headers") {
    118   public = [
    119     "attributes.h",
    120     "const_init.h",
    121     "macros.h",
    122     "optimization.h",
    123     "port.h",
    124     "thread_annotations.h",
    125   ]
    126   deps = [ ":config" ]
    127 }
    128 
    129 absl_source_set("malloc_internal") {
    130   sources = [ "internal/low_level_alloc.cc" ]
    131   public = [
    132     "internal/direct_mmap.h",
    133     "internal/low_level_alloc.h",
    134   ]
    135   deps = [
    136     ":base",
    137     ":base_internal",
    138     ":config",
    139     ":core_headers",
    140     ":dynamic_annotations",
    141     ":raw_logging_internal",
    142   ]
    143 }
    144 
    145 absl_source_set("base_internal") {
    146   public = [
    147     "internal/hide_ptr.h",
    148     "internal/identity.h",
    149     "internal/scheduling_mode.h",
    150   ]
    151   deps = [
    152     ":config",
    153     "//third_party/abseil-cpp/absl/meta:type_traits",
    154   ]
    155   visibility = [ "//third_party/abseil-cpp/absl/*" ]
    156 }
    157 
    158 absl_source_set("base") {
    159   sources = [
    160     "internal/cycleclock.cc",
    161     "internal/spinlock.cc",
    162     "internal/sysinfo.cc",
    163     "internal/thread_identity.cc",
    164     "internal/unscaledcycleclock.cc",
    165   ]
    166   public = [
    167     "call_once.h",
    168     "casts.h",
    169     "internal/cycleclock.h",
    170     "internal/low_level_scheduling.h",
    171     "internal/per_thread_tls.h",
    172     "internal/spinlock.h",
    173     "internal/sysinfo.h",
    174     "internal/thread_identity.h",
    175     "internal/tsan_mutex_interface.h",
    176     "internal/unscaledcycleclock.h",
    177   ]
    178 
    179   # TODO(mbonadei): The bazel file has:
    180   #   "-DEFAULTLIB:advapi32.lib"
    181   # understand if this is needed here as well.
    182   deps = [
    183     ":atomic_hook",
    184     ":base_internal",
    185     ":config",
    186     ":core_headers",
    187     ":cycleclock_internal",
    188     ":dynamic_annotations",
    189     ":log_severity",
    190     ":nullability",
    191     ":raw_logging_internal",
    192     ":spinlock_wait",
    193     "//third_party/abseil-cpp/absl/meta:type_traits",
    194   ]
    195 }
    196 
    197 absl_test("attributes_test") {
    198   sources = [ "attributes_test.cc" ]
    199   deps = [
    200     ":config",
    201     ":core_headers",
    202   ]
    203 }
    204 
    205 if (absl_build_tests) {
    206   import("//testing/test.gni")
    207   test("absl_c_header_test") {
    208     sources = [ "c_header_test.c" ]
    209     deps = [
    210       ":config",
    211       ":core_headers",
    212     ]
    213   }
    214 }
    215 
    216 absl_source_set("throw_delegate") {
    217   sources = [ "internal/throw_delegate.cc" ]
    218   public = [ "internal/throw_delegate.h" ]
    219   deps = [
    220     ":config",
    221     ":raw_logging_internal",
    222   ]
    223   visibility = [ "//third_party/abseil-cpp/absl/*" ]
    224 }
    225 
    226 absl_source_set("exception_testing") {
    227   testonly = true
    228   public = [ "internal/exception_testing.h" ]
    229   deps = [ ":config" ]
    230   visibility = [ "//third_party/abseil-cpp/absl/*" ]
    231 }
    232 
    233 absl_source_set("pretty_function") {
    234   public = [ "internal/pretty_function.h" ]
    235   visibility = [ "//third_party/abseil-cpp/absl/*" ]
    236 }
    237 
    238 absl_source_set("spinlock_test_common") {
    239   testonly = true
    240   sources = [ "spinlock_test_common.cc" ]
    241   deps = [
    242     ":base",
    243     ":base_internal",
    244     ":config",
    245     ":core_headers",
    246     "//third_party/abseil-cpp/absl/synchronization",
    247     "//third_party/googletest:gtest",
    248   ]
    249 }
    250 
    251 absl_source_set("endian") {
    252   public = [
    253     "internal/endian.h",
    254     "internal/unaligned_access.h",
    255   ]
    256   deps = [
    257     ":base",
    258     ":config",
    259     ":core_headers",
    260     ":nullability",
    261   ]
    262 }
    263 
    264 absl_source_set("scoped_set_env") {
    265   testonly = true
    266   public = [ "internal/scoped_set_env.h" ]
    267   sources = [ "internal/scoped_set_env.cc" ]
    268   deps = [
    269     ":config",
    270     ":raw_logging_internal",
    271   ]
    272   visibility = [ "//third_party/abseil-cpp/absl/*" ]
    273 }
    274 
    275 absl_source_set("strerror") {
    276   sources = [ "internal/strerror.cc" ]
    277   public = [ "internal/strerror.h" ]
    278   deps = [
    279     ":config",
    280     ":core_headers",
    281     ":errno_saver",
    282   ]
    283   visibility = [ "//third_party/abseil-cpp/absl/*" ]
    284 }
    285 
    286 absl_source_set("fast_type_id") {
    287   public = [ "internal/fast_type_id.h" ]
    288   deps = [ ":config" ]
    289   visibility = [ "//third_party/abseil-cpp/absl/*" ]
    290 }
    291 
    292 absl_source_set("prefetch") {
    293   public = [ "prefetch.h" ]
    294   deps = [
    295     ":config",
    296     ":core_headers",
    297   ]
    298 }
    299 
    300 absl_test("prefetch_test") {
    301   sources = [ "prefetch_test.cc" ]
    302   deps = [ ":prefetch" ]
    303 }
    304 
    305 absl_source_set("poison") {
    306   public = [ "internal/poison.h" ]
    307   sources = [ "internal/poison.cc" ]
    308   deps = [
    309     ":config",
    310     ":core_headers",
    311     ":malloc_internal",
    312   ]
    313 }
    314 
    315 absl_test("poison_test") {
    316   sources = [ "internal/poison_test.cc" ]
    317   deps = [
    318     ":config",
    319     ":poison",
    320   ]
    321 }
    322 
    323 absl_source_set("iterator_traits_internal") {
    324   public = [ "internal/iterator_traits.h" ]
    325   deps = [
    326     ":config",
    327     "//third_party/abseil-cpp/absl/meta:type_traits",
    328   ]
    329 }
    330 
    331 absl_test("iterator_traits_test") {
    332   sources = [ "internal/iterator_traits_test.cc" ]
    333   deps = [
    334     ":config",
    335     ":iterator_traits_internal",
    336     ":iterator_traits_test_helper",
    337   ]
    338 }
    339 
    340 absl_source_set("tracing_internal") {
    341   public = [ "internal/tracing.h" ]
    342   sources = [ "internal/tracing.cc" ]
    343   deps = [
    344     ":config",
    345     ":core_headers",
    346   ]
    347 }
    348 
    349 absl_source_set("iterator_traits_test_helper") {
    350   public = [ "internal/iterator_traits_test_helper.h" ]
    351   deps = [ ":config" ]
    352 }
    353 
    354 absl_test("tracing_internal_weak_test") {
    355   sources = [ "internal/tracing_weak_test.cc" ]
    356   deps = [ ":tracing_internal" ]
    357 }
    358 
    359 absl_test("tracing_internal_strong_test") {
    360   sources = [ "internal/tracing_strong_test.cc" ]
    361   deps = [
    362     ":config",
    363     ":core_headers",
    364     ":tracing_internal",
    365   ]
    366 }
    367 
    368 absl_test("config_test") {
    369   sources = [ "config_test.cc" ]
    370   deps = [
    371     ":config",
    372     "//third_party/abseil-cpp/absl/synchronization:thread_pool",
    373   ]
    374 }
    375 
    376 absl_test("no_destructor_test") {
    377   sources = [ "no_destructor_test.cc" ]
    378   deps = [
    379     ":config",
    380     ":no_destructor",
    381     ":raw_logging_internal",
    382   ]
    383 }
    384 
    385 absl_test("nullability_test") {
    386   sources = [ "nullability_test.cc" ]
    387   deps = [
    388     ":core_headers",
    389     ":nullability",
    390   ]
    391 }
    392 
    393 absl_test("nullability_default_nonnull_test") {
    394   sources = [ "nullability_default_nonnull_test.cc" ]
    395   deps = [ ":nullability" ]
    396 }