Introduce --incompatible_remove_local_resources to begin deprecating --local_resources.

If --incompatible_remove_local_resources=true, the build will fail with an ExecutorInitException if --local_resources is passed.

PiperOrigin-RevId: 240196119
diff --git a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
index e3099fc..3247b924 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
@@ -314,6 +314,20 @@
   public ResourceSet availableResources;
 
   @Option(
+      name = "incompatible_remove_local_resources",
+      defaultValue = "false",
+      documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY,
+      effectTags = {OptionEffectTag.EXECUTION},
+      metadataTags = {
+        OptionMetadataTag.INCOMPATIBLE_CHANGE,
+        OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
+      },
+      help =
+          "Deprecate local_resources in favor of --local_ram_resources and "
+              + "--local_cpu_resources.")
+  public boolean removeLocalResources;
+
+  @Option(
       name = "local_cpu_resources",
       defaultValue = "HOST_CPUS",
       documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,