Bug 1765931 [wpt PR 33748] - Fix line cache for simplified layout, a=testonly
[gecko.git] / build / gn.mozbuild
blob5df682b6a1c7942f282a82bf60d938df5f0428c7
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 if os == "Linux":
17     if CONFIG['MOZ_X11']:
18         gn_vars['use_x11'] = True
19     else:
20         gn_vars['use_x11'] = False
22 flavors = {
23     'WINNT': 'win',
24     'Android': 'android',
25     'Linux': 'linux',
26     'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
27     'SunOS': 'solaris',
28     'GNU/kFreeBSD': 'freebsd',
29     'DragonFly': 'dragonfly',
30     'FreeBSD': 'freebsd',
31     'NetBSD': 'netbsd',
32     'OpenBSD': 'openbsd',
34 gn_vars['target_os'] = flavors.get(os)
36 arches = {
37     'x86_64': 'x64',
38     'aarch64': 'arm64',
41 gn_vars['host_cpu'] = arches.get(CONFIG['HOST_CPU_ARCH'], CONFIG['HOST_CPU_ARCH'])
42 gn_vars['target_cpu'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH'])