Provide a SplitCommandLine method in the option processor
that takes a given command line args and splits it into the corresponding
{binary, startup_args, command, command_args}.
The purpose of this function is to help split the responsibilities
of the ParseOptions function by processing the startup options independently
(i.e. rc files detection and processing) from the command options.
This will be combined with ParseOptions in a subsequent CL.
--
MOS_MIGRATED_REVID=139773786
diff --git a/src/main/cpp/startup_options.h b/src/main/cpp/startup_options.h
index d0cd804..833af1b 100644
--- a/src/main/cpp/startup_options.h
+++ b/src/main/cpp/startup_options.h
@@ -111,12 +111,13 @@
// Checks whether the argument is a valid nullary option.
// E.g. --master_bazelrc, --nomaster_bazelrc.
- bool IsNullary(const std::string &arg) const;
+ bool IsNullary(const std::string& arg) const;
// Checks whether the argument is a valid unary option.
// E.g. --blazerc=foo, --blazerc foo.
- bool IsUnary(const std::string &arg,
- const std::string &next_arg) const;
+ bool IsUnary(const std::string& arg) const;
+
+ std::string GetLowercaseProductName() const;
// The capitalized name of this binary.
const std::string product_name;