Change the list of rc files accepted.

The old list was, in order:
- %workspace%/tools/bazel.rc (unless --nomaster_bazelrc)
- %binary_dir%/bazel.bazelrc (unless --nomaster_bazelrc)
- system rc, /etc/bazel.bazelrc or in %ProgramData% for Windows (unless --nomaster_bazelrc)
- the first of the following gets called the "user" bazelrc
  - path passed by flag --bazelrc
  - %workspace%/.bazelrc
  - $HOME/.bazelrc

The new list is hopefully a bit more consistent, as:
- system rc (unless --nosystem_rc)
- workspace, %workspace%/.bazelrc (unless --noworkspace_rc)
- user, $HOME/.bazelrc (unless --nohome_rc)
- command-line provided, passed as --bazelrc or nothing if the flag is absent.

This list removes two less than useful locations, duplication in the Workspace directory, and the rc next to the bazel binary. This location made sense at Google but is generally nonsensical elsewhere so we are removing it. It also stops the user local rc file from being overriden by passing in a custom file in --bazelrc.

In both old and new, --ignore_all_rc_files disables all of the above.
For a transition period, any file that you would have loaded but was not read will cause a WARNING to be printed. If you want the old file to still be read without moving its location, you can always import it into one of the new standard locations, or create a symlink.

Closes #4502, except for cleanup to remove the warning after a transition period of 1 Bazel version has passed.

RELNOTES[INC]: New bazelrc file list.

PiperOrigin-RevId: 207189212
diff --git a/src/main/cpp/option_processor-internal.h b/src/main/cpp/option_processor-internal.h
index 47f0df4..c552db4 100644
--- a/src/main/cpp/option_processor-internal.h
+++ b/src/main/cpp/option_processor-internal.h
@@ -16,6 +16,7 @@
 #define BAZEL_SRC_MAIN_CPP_OPTION_PROCESSOR_INTERNAL_H_
 
 #include <algorithm>
+#include <set>
 
 #include "src/main/cpp/rc_file.h"
 #include "src/main/cpp/util/exit_code.h"
@@ -30,6 +31,19 @@
 std::vector<std::string> DedupeBlazercPaths(
     const std::vector<std::string>& paths);
 
+// Get the legacy list of rc files that would have been loaded - this is to
+// provide a useful warning if files are being ignored that were loaded in a
+// previous version of Bazel.
+// TODO(b/3616816): Remove this once the warning is no longer useful.
+std::set<std::string> GetOldRcPaths(
+    const WorkspaceLayout* workspace_layout, const std::string& workspace,
+    const std::string& cwd, const std::string& path_to_binary,
+    const std::vector<std::string>& startup_args);
+
+// Returns what the "user bazelrc" would have been in the legacy rc list.
+std::string FindLegacyUserBazelrc(const char* cmd_line_rc_file,
+                                  const std::string& workspace);
+
 std::string FindSystemWideRc();
 
 std::string FindRcAlongsideBinary(const std::string& cwd,