Allow relative log paths

This reverts commit bec1ea84caa75c8c3850b96d105627d1a36e322a and ed7f81a5bd0af39c1f94951aaa272e296baa9962

These changes required that users pass absolute paths to `--profile` and `--memory_profile` with the goal of disallowing users to alter the source tree through bazel invocations. Practically speaking it's very useful for users to quickly dump a log like `--profile=foo.log` for testing, where that won't be picked up by any bazel rules, and therefore shouldn't affect anything, or to write their logs to a `.gitignore`d / `.bazelignore`d directory such as `--profile=./tmp/logs/foo.log`. This has the advantage of making sure logs don't conflict between multiple source trees using bazel. Regardless This wouldn't restrict users from adding an absolute path in their bazel wrappers to the source root such as `--profile=$PWD/tmp/logs/foo.log`, so I think we should allow users to self regulate these issues.

More discussion: https://github.com/bazelbuild/bazel/commit/bec1ea84caa75c8c3850b96d105627d1a36e322a#commitcomment-53595211

Closes #13757.

PiperOrigin-RevId: 387332197
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 da013bf..29077ad 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
@@ -300,7 +300,7 @@
       defaultValue = "null",
       documentationCategory = OptionDocumentationCategory.LOGGING,
       effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING},
-      converter = OptionsUtils.AbsolutePathFragmentConverter.class,
+      converter = OptionsUtils.PathFragmentConverter.class,
       help =
           "If set, profile Bazel and write data to the specified "
               + "file. Use bazel analyze-profile to analyze the profile.")
@@ -331,7 +331,7 @@
       defaultValue = "null",
       documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
       effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING},
-      converter = OptionsUtils.AbsolutePathFragmentConverter.class,
+      converter = OptionsUtils.PathFragmentConverter.class,
       help =
           "If set, write memory usage data to the specified file at phase ends and stable heap to"
               + " master log at end of build.")