Source code

Revision control

Other Tools

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
}
36
37
gyp_vars['host_arch'] = arches.get(CONFIG['HOST_CPU_ARCH'], CONFIG['HOST_CPU_ARCH'])
38
gyp_vars['target_arch'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH'])