Adds an argument loader without FEX arguments

Will be necessary when the interpreter path is enabled, we can't accept
arguments there
This commit is contained in:
Ryan Houdek 2020-12-07 11:23:01 -08:00
parent 4603b92b9f
commit 1b4dc23c13
2 changed files with 9 additions and 0 deletions

View File

@ -281,6 +281,14 @@ namespace FEX::ArgLoader {
ProgramArguments = Parser.parsed_args();
}
void LoadWithoutArguments(int _argc, char **_argv) {
optparse::OptionParser Parser{};
optparse::Values Options = Parser.parse_args(_argc, _argv);
RemainingArgs = Parser.args();
ProgramArguments = Parser.parsed_args();
}
std::vector<std::string> Get() {
return RemainingArgs;
}

View File

@ -20,6 +20,7 @@ namespace FEX::ArgLoader {
char **argv;
};
void LoadWithoutArguments(int _argc, char **_argv);
std::vector<std::string> Get();
std::vector<std::string> GetParsedArgs();