Config/value/define cli options work
commit54a97f1902d0026acfab5f81d3422afaef00ad57
authorThomas Jiang <thomasjiang@fb.com>
Fri, 7 Jan 2022 20:56:23 +0000 (7 12:56 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 7 Jan 2022 20:57:57 +0000 (7 12:57 -0800)
treef8f30016920088650c819f7106d2b64ae87edeea
parentc83bfdd8bd1fc4e17a630baa4b373c9179a712d1
Config/value/define cli options work

Summary:
Previously, hh_single_compile_cpp would accept the following command line arguments:
`-c` for config files
`-v` for hdf style cli options
`-d` for ini style cli options

However, despite accepting these command line arguments, hh_single_compile_cpp didn't do anything with them. Instead, it just accepted them and threw them away, opting to use some default parser and hhbc options instead.

This diff changes this behavior. Now these three options are accepted and they are parsed and they actually go on to influence compilation behavior.

I'm using Hack Native's rust implementation of options parsing. I've done a preliminary sweep of options usage in the wild using zbgs to determine which variants of flags are used. I can't guarantee perfect accuracy, but good enough I think.

Reviewed By: aorenste

Differential Revision: D33426218

fbshipit-source-id: 6c0d9a5aa993e593a533678ee9a558cf65a0bb8e
hphp/hack/src/hackc/compile/compile.rs