Summary:
These are ported over from the logic in the watchman and eden getdeps
scripts, with additions to help bootstrap a build environment.
These are sufficient to build watchman with thrift support on windows, mac and
linux, and eden on mac and linux when combined with the getdeps code that
follows in later diffs in this stack.
Reviewed By: simpkins
Differential Revision: D14691005
fbshipit-source-id: 7f8b02fedcdc020e2d0e758c466959d8161d4587