build/buildconfig.py
author Tom Ritter <tom@mozilla.com>
Tue, 08 Jan 2019 15:16:39 -0600
changeset 510199 763f90cc2fac67d6c5598df0fc3af3a335680382
parent 436572 6074db12d685655fe5692d59471b3c32cc967dc9
permissions -rw-r--r--
Bug 1460620 - Have MinGW look for d3dcompiler_47.dll (so it will be packaged) r=froydnj

# 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 sys
from mozbuild.base import MozbuildObject
from mozbuild.backend.configenvironment import PartialConfigEnvironment

config = MozbuildObject.from_environment()
partial_config = PartialConfigEnvironment(config.topobjdir)

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

for var in ('defines', 'substs', 'get_dependencies'):
    value = getattr(partial_config, var)
    setattr(sys.modules[__name__], var, value)