Demote OptionProcessor from globals
Some more cutting back on global mutable state that's hard to reason about the
validity of. This makes it more obvious what actually depends on what aspects
of the option processor and should make it easier to come even on the TODO to
make GlobalVariables.options const.
PiperOrigin-RevId: 251294543
diff --git a/src/main/cpp/global_variables.h b/src/main/cpp/global_variables.h
index 458bba3..03b4606 100644
--- a/src/main/cpp/global_variables.h
+++ b/src/main/cpp/global_variables.h
@@ -26,7 +26,6 @@
namespace blaze {
-class OptionProcessor;
class StartupOptions;
// The reason for a blaze server restart.
@@ -42,7 +41,7 @@
};
struct GlobalVariables {
- GlobalVariables(OptionProcessor *option_processor);
+ GlobalVariables();
std::string ServerJarPath() const {
// The server jar is called "A-server.jar" so it's the first binary we
@@ -61,10 +60,6 @@
// If not under a workspace directory, this is equal to cwd.
std::string workspace;
- // Option processor responsible for parsing RC files and converting them into
- // the argument list passed on to the server.
- OptionProcessor *option_processor;
-
// The path of the JVM executable that should be used to launch Blaze.
std::string jvm_path;