build/buildconfig.py
author Alessio Placitelli <alessio.placitelli@gmail.com>
Mon, 27 Nov 2017 11:54:27 +0100
changeset 397944 443747e39abe9c7f7dae06603daa57f5c0706d1b
parent 385817 6074db12d685655fe5692d59471b3c32cc967dc9
permissions -rw-r--r--
Bug 1417473 - Implement the hybrid content telemetry API. r=chutten,Gijs This enables whitelisted pages to send messages to the chrome using asynchronous messaging from the content. This patch only adds the API and test coverage. The first consumer of the API will be added as part of bug 1417479. MozReview-Commit-ID: ESxFFjvhpWA

# 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)