getdeps: fix handling of the --host-type command line flag

Summary:
Fix the BuildOptions class to correctly honor the `host_type` parameter that
it was constructed with when constructing the manifest evaluation context.
I accidentally broke this behavior in D16477396, and incorrectly had this code
path default to using the current host system rather than the value passed in
from the command line.

Reviewed By: wez

Differential Revision: D16779579

fbshipit-source-id: de911daaa643f6303fd35149775ab25d3f64d34f
This commit is contained in:
Adam Simpkins 2019-08-13 14:08:08 -07:00 committed by Facebook Github Bot
parent 918adfd3de
commit df9a1bf374

View File

@ -130,7 +130,7 @@ class BuildOptions(object):
def get_context_generator(self, host_tuple=None, facebook_internal=False):
""" Create a manifest ContextGenerator for the specified target platform. """
if host_tuple is None:
host_type = HostType()
host_type = self.host_type
elif isinstance(host_tuple, HostType):
host_type = host_tuple
else: