build/buildconfig.py
author Andrea Marchesini <amarchesini@mozilla.com>
Mon, 11 Jul 2016 00:28:13 +0200
changeset 344439 2f89df793074acdd9a682c055cd7c9470409cf5e
parent 341980 a2e4369f86dcf620b453de3da6525a87ea1808fc
child 376613 e9f2075a8de61086e6ba7207fdaf1f81b578f4ff
permissions -rw-r--r--
Bug 1279503 - part 2 - moving BrowserConfiguration in the ContentChild::InitXPCOM, r=gabor

# 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/.

import os
import sys
from mozbuild.base import MozbuildObject

config = MozbuildObject.from_environment()

for var in ('topsrcdir', 'topobjdir', 'defines', 'non_global_defines',
            'substs'):
    value = getattr(config, var)
    setattr(sys.modules[__name__], var, value)

substs = dict(substs)

for var in os.environ:
    if var != 'SHELL' and var in substs:
        substs[var] = os.environ[var]