build/gn.mozbuild
author Bobby Holley <bobbyholley@gmail.com>
Sat, 01 Dec 2018 03:05:56 +0000
changeset 449071 6fafd118a82a58aa39d9a4c26107a28f631e3a94
parent 398663 5b4da712bf1e276dd5df44a1b23e2a715f5c19cb
permissions -rw-r--r--
Bug 1510490 - Measure shader cache memory usage and remove total_gpu_bytes. r=mattwoodrow The latter causes confusion in the memory reports because it gets summed up and thus effectively doubles the reported texture memory usage. I've decided it's best to drop, and so might as well do that while we're already messing around with the memory reports and the associated boilerplate. Depends on D13439 Differential Revision: https://phabricator.services.mozilla.com/D13440

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

gn_vars = {}

if CONFIG['MOZ_DEBUG']:
   gn_vars['is_debug'] = True
else:
   gn_vars['is_debug'] = False

os = CONFIG['OS_TARGET']

flavors = {
    'WINNT': 'win',
    'Android': 'android',
    'Linux': 'linux',
    'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
    'SunOS': 'solaris',
    'GNU/kFreeBSD': 'freebsd',
    'DragonFly': 'dragonfly',
    'FreeBSD': 'freebsd',
    'NetBSD': 'netbsd',
    'OpenBSD': 'openbsd',
}
gn_vars['target_os'] = flavors.get(os)

arches = {
    'x86_64': 'x64',
    'aarch64': 'arm64',
}

gn_vars['host_cpu'] = arches.get(CONFIG['HOST_CPU_ARCH'], CONFIG['HOST_CPU_ARCH'])
gn_vars['target_cpu'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH'])