diff options
author | cushon <cushon@google.com> | 2018-07-25 10:33:40 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-25 10:35:02 -0700 |
commit | 2a8b6579c9535b649f2970307bc058895b880eb5 (patch) | |
tree | afae58945278ce4e9b8f02fdda2a06518da67d22 /src/main/cpp/startup_options.h | |
parent | 61f477e8193b83864824f30b06b9e1576d06f4d5 (diff) |
Add a --server_javabase startup option as an alias for the LHS --host_javabase
to avoid confusion between the LHS and RHS host_javabases.
The LHS --host_javabase option should be considered deprecated and will
eventually be removed.
RELNOTES: Rename the startup flag --host_javabase to --server_javabase to avoid confusion with the build flag --host_javabase
PiperOrigin-RevId: 206015757
Diffstat (limited to 'src/main/cpp/startup_options.h')
-rw-r--r-- | src/main/cpp/startup_options.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/main/cpp/startup_options.h b/src/main/cpp/startup_options.h index 3998195545..af9f276e24 100644 --- a/src/main/cpp/startup_options.h +++ b/src/main/cpp/startup_options.h @@ -110,6 +110,10 @@ class StartupOptions { bool *is_space_separated, std::string *error); + // Processes the --server_javabase flag, or its deprecated alias + // --host_javabase. + void ProcessServerJavabase(const char *value, const std::string &rcfile); + // Process an ordered list of RcStartupFlags using ProcessArg. blaze_exit_code::ExitCode ProcessArgs( const std::vector<RcStartupFlag>& rcstartup_flags, @@ -167,7 +171,7 @@ class StartupOptions { // Returns the exit code after this operation. "error" will be set to a // descriptive string for any value other than blaze_exit_code::SUCCESS. blaze_exit_code::ExitCode AddJVMArguments( - const std::string &host_javabase, std::vector<std::string> *result, + const std::string &server_javabase, std::vector<std::string> *result, const std::vector<std::string> &user_options, std::string *error) const; // Adds JVM logging-related flags for Bazel. @@ -181,8 +185,8 @@ class StartupOptions { // This is called by StartupOptions::AddJVMArguments and is a separate method // so that subclasses of StartupOptions can override it. virtual blaze_exit_code::ExitCode AddJVMMemoryArguments( - const std::string &host_javabase, std::vector<std::string> *result, - const std::vector<std::string> &user_options, std::string *error) const; + const std::string &server_javabase, std::vector<std::string> *result, + const std::vector<std::string> &user_options, std::string *error) const; // Checks whether the argument is a valid nullary option. // E.g. --master_bazelrc, --nomaster_bazelrc. @@ -270,12 +274,12 @@ class StartupOptions { std::string GetEmbeddedJavabase(); // Returns the GetHostJavabase. This should be called after parsing - // the --host_javabase option. - std::string GetHostJavabase(); + // the --server_javabase option. + std::string GetServerJavabase(); - // Returns the explicit value of the --host_javabase startup option or the + // Returns the explicit value of the --server_javabase startup option or the // empty string if it was not specified on the command line. - std::string GetExplicitHostJavabase() const; + std::string GetExplicitServerJavabase() const; // Port to start up the gRPC command server on. If 0, let the kernel choose. int command_port; @@ -310,8 +314,8 @@ class StartupOptions { void RegisterNullaryStartupFlag(const std::string& flag_name); private: - std::string host_javabase; - std::string default_host_javabase; + std::string server_javabase_; + std::string default_server_javabase_; // Contains the collection of startup flags that Bazel accepts. std::set<std::unique_ptr<StartupFlag>> valid_startup_flags; |