Execute `mach build` from servo's root directory.

This commit is contained in:
Dhananjay Nakrani 2015-09-06 14:57:24 -07:00
Родитель c2ce0fc1d7
Коммит ce6e614097
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -258,8 +258,16 @@ class ServoBuilder(Builder):
return os.path.join(self.objdir(), 'release', 'servo')
def make(self):
args = [os.path.join('.', self.folder, 'mach'), 'build' ,'--release']
Run(args, self.env.get())
# Remember cwd
cwd = os.getcwd()
# cd into servo's root directory. Requirement of 'mach build'
os.chdir(self.folder)
try:
args = [os.path.join('.', 'mach'), 'build' ,'--release']
Run(args, self.env.get())
finally:
# Go back to the cwd
os.chdir(cwd)
def getBuilder(config, path):
# fingerprint the known builders