Bug 1701554 [wpt PR 28273] - Implement invert and negate exp.node creation and type...
[gecko.git] / build / gn.mozbuild
blob2351aca4a3eeccabd9f686ec806e6f7d8121bd9c
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 gn_vars = {}
9 if CONFIG['MOZ_DEBUG']:
10    gn_vars['is_debug'] = True
11 else:
12    gn_vars['is_debug'] = False
14 os = CONFIG['OS_TARGET']
16 flavors = {
17     'WINNT': 'win',
18     'Android': 'android',
19     'Linux': 'linux',
20     'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
21     'SunOS': 'solaris',
22     'GNU/kFreeBSD': 'freebsd',
23     'DragonFly': 'dragonfly',
24     'FreeBSD': 'freebsd',
25     'NetBSD': 'netbsd',
26     'OpenBSD': 'openbsd',
28 gn_vars['target_os'] = flavors.get(os)
30 arches = {
31     'x86_64': 'x64',
32     'aarch64': 'arm64',
35 gn_vars['host_cpu'] = arches.get(CONFIG['HOST_CPU_ARCH'], CONFIG['HOST_CPU_ARCH'])
36 gn_vars['target_cpu'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH'])