Simplify installation of rustc/cargo (#8626)
Summary:
1. use `ExternalProject_add` to let CMake handle fetching, verification,
and installation as a build step instead of a configure step
2. instead of setting global variables, define targets; this makes it
possible to mark the hack build as depending on rustc
This is basically the same as what I'm now doing for jemalloc. I'm
hoping to spend some time next year consistently doing this for our
third-party projects.
Pull Request resolved: https://github.com/facebook/hhvm/pull/8626
Reviewed By: jjergus
Differential Revision:
D18917497
fbshipit-source-id:
e15128d4c0ea4d1681a881c54d1e3098b7b243c7