tor-browser

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

gyp_base.mozbuild (1160B)


      1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
      2 # vim: set filetype=python:
      3 # This Source Code Form is subject to the terms of the Mozilla Public
      4 # License, v. 2.0. If a copy of the MPL was not distributed with this
      5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      6 
      7 gyp_vars = {}
      8 
      9 os = CONFIG["OS_TARGET"]
     10 
     11 if os == "WINNT":
     12     gyp_vars.update(
     13         MSVS_VERSION=CONFIG["MSVS_VERSION"],
     14         MSVS_OS_BITS=64 if CONFIG["HAVE_64BIT_BUILD"] else 32,
     15     )
     16 
     17 flavors = {
     18     "WINNT": "win",
     19     "Android": "android",
     20     "Linux": "linux",
     21     "Darwin": "mac" if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa" else "ios",
     22     "SunOS": "solaris",
     23     "GNU/kFreeBSD": "freebsd",
     24     "DragonFly": "dragonfly",
     25     "FreeBSD": "freebsd",
     26     "NetBSD": "netbsd",
     27     "OpenBSD": "openbsd",
     28 }
     29 gyp_vars["OS"] = flavors.get(os)
     30 
     31 arches = {
     32     "x86_64": "x64",
     33     "x86": "ia32",
     34     "aarch64": "arm64",
     35     "ppc64": "ppc64le" if CONFIG["TARGET_ENDIANNESS"] == "little" else "ppc64",
     36 }
     37 
     38 gyp_vars["host_arch"] = arches.get(CONFIG["HOST_CPU_ARCH"], CONFIG["HOST_CPU_ARCH"])
     39 gyp_vars["target_arch"] = arches.get(CONFIG["TARGET_CPU"], CONFIG["TARGET_CPU"])