Bug 1874684 - Part 17: Fix uninitialised variable warnings from clang-tidy. r=allstarschh
[gecko.git] / build / gyp_base.mozbuild
blob17b649be4ebc0e942d4168d48c778a7dc06a7f75
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/.
7 gyp_vars = {}
9 os = CONFIG["OS_TARGET"]
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     )
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",
29 gyp_vars["OS"] = flavors.get(os)
31 arches = {
32     "x86_64": "x64",
33     "x86": "ia32",
34     "aarch64": "arm64",
35     "ppc64": "ppc64le" if CONFIG["TARGET_ENDIANNESS"] == "little" else "ppc64",
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"])