Add a custom OOM message emission capability
This change adds the ability to set a custom OOM error message via a new
option.
RELNOTES: None.
PiperOrigin-RevId: 252830400
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
index b70b1fc..994f0a0 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
@@ -188,6 +188,15 @@
public String buildRequestId;
@Option(
+ name = "oom_message",
+ defaultValue = "",
+ documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+ effectTags = {OptionEffectTag.BAZEL_MONITORING, OptionEffectTag.TERMINAL_OUTPUT},
+ metadataTags = {OptionMetadataTag.HIDDEN},
+ help = "Custom message to be emitted on an out of memory failure.")
+ public String oomMessage;
+
+ @Option(
name = "incompatible_remove_binary_profile",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.LOGGING,