tor-browser

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

BUILD.gn (1726B)


      1 # Copyright 2019 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/chromeos/ui_mode.gni")
      6 
      7 assert(is_chromeos)
      8 
      9 config("compiler_cpu_abi") {
     10   # These flags are added by the Chrome OS toolchain compiler wrapper,
     11   # or are implicitly passed by Chome OS's toolchain's clang due to
     12   # the cmake flags that clang was built with. Passing them redundantly
     13   # is harmless and prepares for using Chromium's toolchain.
     14   if (is_chromeos_device) {
     15     if (target_cpu == "x64") {
     16       asmflags = [ "--target=x86_64-cros-linux-gnu" ]
     17       cflags = [
     18         "--target=x86_64-cros-linux-gnu",
     19         "-mno-movbe",
     20       ]
     21       ldflags = [
     22         "--target=x86_64-cros-linux-gnu",
     23         "-mno-movbe",
     24       ]
     25     } else if (target_cpu == "arm") {
     26       asmflags = [ "--target=armv7a-cros-linux-gnueabihf" ]
     27       cflags = [ "--target=armv7a-cros-linux-gnueabihf" ]
     28       ldflags = [ "--target=armv7a-cros-linux-gnueabihf" ]
     29     } else if (target_cpu == "arm64") {
     30       asmflags = [ "--target=aarch64-cros-linux-gnu" ]
     31       cflags = [ "--target=aarch64-cros-linux-gnu" ]
     32       ldflags = [ "--target=aarch64-cros-linux-gnu" ]
     33     } else {
     34       assert(false, "add support for $target_cpu here")
     35     }
     36   }
     37 }
     38 
     39 config("runtime_library") {
     40   # These flags are added by the Chrome OS toolchain compiler wrapper,
     41   # or are implicitly passed by Chome OS's toolchain's clang due to
     42   # the cmake flags that clang was built with. Passing them redundantly
     43   # is harmless and prepares for using Chromium's toolchain.
     44   if (is_chromeos_device) {
     45     ldflags = [
     46       "--rtlib=compiler-rt",
     47       "--unwindlib=libunwind",
     48     ]
     49   }
     50 }