tor-browser

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

BUILD.gn (7570B)


      1 # Copyright 2013 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("//chromium/build/config/dcheck_always_on.gni")
      6 import("//chromium/build/config/ozone.gni")
      7 import("//chromium/build/config/sysroot.gni")
      8 import("//chromium/build/config/ui.gni")
      9 import("//chromium/build/toolchain/gcc_toolchain.gni")
     10 
     11 clang_toolchain("clang_ppc64") {
     12   enable_linker_map = true
     13   toolchain_args = {
     14     target_cpu = "ppc64"
     15     current_os = "linux"
     16   }
     17 }
     18 
     19 clang_toolchain("clang_arm") {
     20   toolchain_args = {
     21     target_cpu = "arm"
     22     current_os = "linux"
     23   }
     24 }
     25 
     26 clang_toolchain("clang_arm64") {
     27   toolchain_args = {
     28     target_cpu = "arm64"
     29     current_os = "linux"
     30   }
     31 }
     32 
     33 gcc_toolchain("arm64") {
     34   toolprefix = "aarch64-linux-gnu-"
     35 
     36   cc = "${toolprefix}gcc"
     37   cxx = "${toolprefix}g++"
     38 
     39   ar = "${toolprefix}ar"
     40   ld = cxx
     41   readelf = "${toolprefix}readelf"
     42   nm = "${toolprefix}nm"
     43 
     44   toolchain_args = {
     45     target_cpu = "arm64"
     46     current_os = "linux"
     47 
     48     # remote execution does not support gcc.
     49     use_remoteexec = false
     50     is_clang = false
     51   }
     52 }
     53 
     54 gcc_toolchain("arm") {
     55   toolprefix = "arm-linux-gnueabihf-"
     56 
     57   cc = "${toolprefix}gcc"
     58   cxx = "${toolprefix}g++"
     59 
     60   ar = "${toolprefix}ar"
     61   ld = cxx
     62   readelf = "${toolprefix}readelf"
     63   nm = "${toolprefix}nm"
     64 
     65   toolchain_args = {
     66     target_cpu = "arm"
     67     current_os = "linux"
     68 
     69     # remote execution does not support gcc.
     70     use_remoteexec = false
     71     is_clang = false
     72   }
     73 }
     74 
     75 clang_toolchain("clang_x86") {
     76   # Output linker map files for binary size analysis.
     77   enable_linker_map = true
     78 
     79   toolchain_args = {
     80     target_cpu = "x86"
     81     current_os = "linux"
     82   }
     83 }
     84 
     85 gcc_toolchain("x86") {
     86   cc = "gcc"
     87   cxx = "g++"
     88 
     89   readelf = "readelf"
     90   nm = "nm"
     91   ar = "ar"
     92   ld = cxx
     93 
     94   # Output linker map files for binary size analysis.
     95   enable_linker_map = true
     96 
     97   toolchain_args = {
     98     target_cpu = "x86"
     99     current_os = "linux"
    100 
    101     # remote execution does not support gcc.
    102     use_remoteexec = false
    103     is_clang = false
    104   }
    105 }
    106 
    107 clang_toolchain("clang_x64") {
    108   # Output linker map files for binary size analysis.
    109   enable_linker_map = true
    110 
    111   toolchain_args = {
    112     target_cpu = "x64"
    113     current_os = "linux"
    114   }
    115 }
    116 
    117 template("clang_v8_toolchain") {
    118   clang_toolchain(target_name) {
    119     toolchain_args = {
    120       current_os = "linux"
    121       forward_variables_from(invoker.toolchain_args, "*")
    122     }
    123   }
    124 }
    125 
    126 clang_v8_toolchain("clang_x86_v8_arm") {
    127   toolchain_args = {
    128     target_cpu = "x86"
    129     v8_target_cpu = "arm"
    130   }
    131 }
    132 
    133 clang_v8_toolchain("clang_x86_v8_mipsel") {
    134   toolchain_args = {
    135     target_cpu = "x86"
    136     v8_target_cpu = "mipsel"
    137   }
    138 }
    139 
    140 clang_v8_toolchain("clang_x86_v8_mips") {
    141   toolchain_args = {
    142     target_cpu = "x86"
    143     v8_target_cpu = "mips"
    144   }
    145 }
    146 
    147 clang_v8_toolchain("clang_x64_v8_arm64") {
    148   toolchain_args = {
    149     target_cpu = "x64"
    150     v8_target_cpu = "arm64"
    151   }
    152 }
    153 
    154 clang_v8_toolchain("clang_x64_v8_mips64el") {
    155   toolchain_args = {
    156     target_cpu = "x64"
    157     v8_target_cpu = "mips64el"
    158   }
    159 }
    160 
    161 clang_v8_toolchain("clang_x64_v8_mips64") {
    162   toolchain_args = {
    163     target_cpu = "x64"
    164     v8_target_cpu = "mips64"
    165   }
    166 }
    167 
    168 clang_v8_toolchain("clang_x64_v8_riscv64") {
    169   toolchain_args = {
    170     target_cpu = "x64"
    171     v8_target_cpu = "riscv64"
    172   }
    173 }
    174 
    175 clang_v8_toolchain("clang_x64_v8_loong64") {
    176   toolchain_args = {
    177     target_cpu = "x64"
    178     v8_target_cpu = "loong64"
    179   }
    180 }
    181 
    182 gcc_toolchain("x64") {
    183   cc = "gcc"
    184   cxx = "g++"
    185 
    186   readelf = "readelf"
    187   nm = "nm"
    188   ar = "ar"
    189   ld = cxx
    190 
    191   # Output linker map files for binary size analysis.
    192   enable_linker_map = true
    193 
    194   toolchain_args = {
    195     target_cpu = "x64"
    196     current_os = "linux"
    197 
    198     # remote execution does not support gcc.
    199     use_remoteexec = false
    200     is_clang = false
    201   }
    202 }
    203 
    204 clang_toolchain("clang_mipsel") {
    205   toolchain_args = {
    206     target_cpu = "mipsel"
    207     current_os = "linux"
    208   }
    209 }
    210 
    211 clang_toolchain("clang_mips64el") {
    212   toolchain_args = {
    213     target_cpu = "mips64el"
    214     current_os = "linux"
    215   }
    216 }
    217 
    218 clang_toolchain("clang_mips64") {
    219   toolchain_args = {
    220     target_cpu = "mips64"
    221     current_os = "linux"
    222   }
    223 }
    224 
    225 gcc_toolchain("mipsel") {
    226   toolprefix = "mipsel-linux-gnu-"
    227 
    228   cc = "${toolprefix}gcc"
    229   cxx = " ${toolprefix}g++"
    230   ar = "${toolprefix}ar"
    231   ld = cxx
    232   readelf = "${toolprefix}readelf"
    233   nm = "${toolprefix}nm"
    234 
    235   toolchain_args = {
    236     cc_wrapper = ""
    237     target_cpu = "mipsel"
    238     current_os = "linux"
    239 
    240     # remote execution does not support gcc.
    241     use_remoteexec = false
    242     is_clang = false
    243   }
    244 }
    245 
    246 gcc_toolchain("mips64el") {
    247   toolprefix = "mips64el-linux-gnuabi64-"
    248 
    249   cc = "${toolprefix}gcc"
    250   cxx = "${toolprefix}g++"
    251   ar = "${toolprefix}ar"
    252   ld = cxx
    253   readelf = "${toolprefix}readelf"
    254   nm = "${toolprefix}nm"
    255 
    256   toolchain_args = {
    257     cc_wrapper = ""
    258     target_cpu = "mips64el"
    259     current_os = "linux"
    260 
    261     # remote execution does not support gcc.
    262     use_remoteexec = false
    263     is_clang = false
    264   }
    265 }
    266 
    267 clang_toolchain("clang_riscv64") {
    268   enable_linker_map = true
    269   toolchain_args = {
    270     target_cpu = "riscv64"
    271     current_os = "linux"
    272     is_clang = true
    273   }
    274 }
    275 
    276 gcc_toolchain("riscv64") {
    277   toolprefix = "riscv64-linux-gnu"
    278 
    279   cc = "${toolprefix}-gcc"
    280   cxx = "${toolprefix}-g++"
    281 
    282   readelf = "${toolprefix}-readelf"
    283   nm = "${toolprefix}-nm"
    284   ar = "${toolprefix}-ar"
    285   ld = cxx
    286 
    287   toolchain_args = {
    288     target_cpu = "riscv64"
    289     current_os = "linux"
    290     is_clang = false
    291   }
    292 }
    293 
    294 clang_toolchain("clang_s390x") {
    295   toolchain_args = {
    296     target_cpu = "s390x"
    297     current_os = "linux"
    298     is_clang = true
    299   }
    300 }
    301 
    302 gcc_toolchain("s390x") {
    303   cc = "gcc"
    304   cxx = "g++"
    305 
    306   readelf = "readelf"
    307   nm = "nm"
    308   ar = "ar"
    309   ld = cxx
    310 
    311   toolchain_args = {
    312     target_cpu = "s390x"
    313     current_os = "linux"
    314 
    315     # remote execution does not support gcc.
    316     use_remoteexec = false
    317     is_clang = false
    318   }
    319 }
    320 
    321 #gcc_toolchain("mips64") {
    322 #  cc = "gcc"
    323 #  cxx = "g++"
    324 #
    325 #  readelf = "readelf"
    326 #  nm = "nm"
    327 #  ar = "ar"
    328 #  ld = cxx
    329 #
    330 #  toolchain_args = {
    331 #    target_cpu = "mips64"
    332 #    current_os = "linux"
    333 #    is_clang = false
    334 #  }
    335 #}
    336 
    337 gcc_toolchain("ppc64") {
    338   cc = "gcc"
    339   cxx = "g++"
    340 
    341   readelf = "readelf"
    342   nm = "nm"
    343   ar = "ar"
    344   ld = cxx
    345 
    346   toolchain_args = {
    347     target_cpu = "ppc64"
    348     current_os = "linux"
    349 
    350     # remote execution does not support gcc.
    351     use_remoteexec = false
    352     is_clang = false
    353   }
    354 }
    355 
    356 gcc_toolchain("mips") {
    357   toolprefix = "mips-linux-gnu-"
    358 
    359   cc = "${toolprefix}gcc"
    360   cxx = "${toolprefix}g++"
    361 
    362   readelf = "${toolprefix}readelf"
    363   nm = "${toolprefix}nm"
    364   ar = "${toolprefix}ar"
    365   ld = cxx
    366 
    367   toolchain_args = {
    368     target_cpu = "mips"
    369     current_os = "linux"
    370 
    371     # remote execution does not support gcc.
    372     use_remoteexec = false
    373     is_clang = false
    374   }
    375 }
    376 
    377 gcc_toolchain("mips64") {
    378   toolprefix = "mips64-linux-gnuabi64-"
    379 
    380   cc = "${toolprefix}gcc"
    381   cxx = "${toolprefix}g++"
    382 
    383   readelf = "${toolprefix}readelf"
    384   nm = "${toolprefix}nm"
    385   ar = "${toolprefix}ar"
    386   ld = cxx
    387 
    388   toolchain_args = {
    389     target_cpu = "mips64"
    390     current_os = "linux"
    391 
    392     # remote execution does not support gcc.
    393     use_remoteexec = false
    394     is_clang = false
    395   }
    396 }
    397 
    398 clang_toolchain("clang_loong64") {
    399   toolchain_args = {
    400     target_cpu = "loong64"
    401     current_os = "linux"
    402   }
    403 }
    404 
    405 gcc_toolchain("loong64") {
    406   toolprefix = "loongarch64-unknown-linux-gnu"
    407 
    408   cc = "${toolprefix}-gcc"
    409   cxx = "${toolprefix}-g++"
    410 
    411   readelf = "${toolprefix}-readelf"
    412   nm = "${toolprefix}-nm"
    413   ar = "${toolprefix}-ar"
    414   ld = cxx
    415 
    416   toolchain_args = {
    417     target_cpu = "loong64"
    418     current_os = "linux"
    419     is_clang = false
    420   }
    421 }