Bug 851141 - Use appropriate config.status for external moz.build files; r=gps

This commit is contained in:
Gregory Szorc 2013-03-14 12:42:01 -07:00
parent ee2c0bedfd
commit 35c97142e2

View File

@ -37,6 +37,8 @@ from mozbuild.util import (
ReadOnlyDict,
)
from mozbuild.backend.configenvironment import ConfigEnvironment
from .sandbox import (
SandboxError,
SandboxExecutionError,
@ -143,6 +145,13 @@ class MozbuildSandbox(Sandbox):
# subdirectory of its topobjdir. Therefore, the topobjdir of
# the external source directory is the parent of our topobjdir.
topobjdir = os.path.dirname(topobjdir)
# This is suboptimal because we load the config.status multiple
# times. We should consider caching it, possibly by moving this
# code up to the reader.
config = ConfigEnvironment.from_config_status(
os.path.join(topobjdir, 'config.status'))
self.config = config
break
self.topsrcdir = topsrcdir