Update out-of-date comment in option_processor.
RELNOTES: None
PiperOrigin-RevId: 178641317
diff --git a/src/main/cpp/option_processor.cc b/src/main/cpp/option_processor.cc
index a7b52d8..07ea066 100644
--- a/src/main/cpp/option_processor.cc
+++ b/src/main/cpp/option_processor.cc
@@ -495,19 +495,22 @@
}
#endif // defined(COMPILER_MSVC)
-// IMPORTANT: Keep the options added here in sync with
-// BlazeCommandDispatcher.INTERNAL_COMMAND_OPTIONS!
+// IMPORTANT: The options added here do not come from the user. In order for
+// their source to be correctly tracked, the options must either be passed
+// as --default_override=0, 0 being "client", or must be listed in
+// BlazeOptionHandler.INTERNAL_COMMAND_OPTIONS!
std::vector<std::string> OptionProcessor::GetBlazercAndEnvCommandArgs(
- const std::string& cwd,
- const std::vector<RcFile*>& blazercs,
+ const std::string& cwd, const std::vector<RcFile*>& blazercs,
const std::map<std::string, std::vector<RcOption>>& rcoptions) {
// Provide terminal options as coming from the least important rc file.
std::vector<std::string> result = {
- "--rc_source=client",
- "--default_override=0:common=--isatty=" +
- ToString(IsStandardTerminal()),
- "--default_override=0:common=--terminal_columns=" +
- ToString(GetTerminalColumns())};
+ "--rc_source=client",
+ "--default_override=0:common=--isatty=" + ToString(IsStandardTerminal()),
+ "--default_override=0:common=--terminal_columns=" +
+ ToString(GetTerminalColumns())};
+ if (IsEmacsTerminal()) {
+ result.push_back("--default_override=0:common=--emacs");
+ }
EnsurePythonPathOption(&result);
@@ -522,8 +525,8 @@
if (it->first != "startup") {
for (const RcOption& rcoption : it->second) {
result.push_back(
- "--default_override=" + ToString(rcoption.rcfile_index() + 1) + ":"
- + it->first + "=" + rcoption.option());
+ "--default_override=" + ToString(rcoption.rcfile_index() + 1) +
+ ":" + it->first + "=" + rcoption.option());
}
}
}
@@ -538,10 +541,6 @@
}
}
result.push_back("--client_cwd=" + blaze::ConvertPath(cwd));
-
- if (IsEmacsTerminal()) {
- result.push_back("--emacs");
- }
return result;
}