blaze_util::ConvertPath should not make paths absolute.

It does not claim to, and this was already true for posix platforms. Windows platforms, however, always made the path absolute, which was a hard-to-diagnose difference between the two.

Similarly, MakeAbsolute was relying on this to be correct for windows, so this change splits the implementation and keeps the behavior consistent. While we're here, also remove the empty-string behavior from MakeAbsolute, and instead make it clear at all sites that this behavior is present and affects accepted flag syntax. We may want to remove this later.

RELNOTES: None.
PiperOrigin-RevId: 199663395
diff --git a/src/main/cpp/blaze_util.cc b/src/main/cpp/blaze_util.cc
index 10c4e1a..d8ec359 100644
--- a/src/main/cpp/blaze_util.cc
+++ b/src/main/cpp/blaze_util.cc
@@ -28,6 +28,7 @@
 #include "src/main/cpp/util/file.h"
 #include "src/main/cpp/util/logging.h"
 #include "src/main/cpp/util/numbers.h"
+#include "src/main/cpp/util/path_platform.h"
 #include "src/main/cpp/util/port.h"
 #include "src/main/cpp/util/strings.h"
 
@@ -118,6 +119,14 @@
       && (arg != "-help") && (arg != "-h");
 }
 
+std::string AbsolutePathFromFlag(const std::string& value) {
+  if (value.empty()) {
+    return blaze_util::GetCwd();
+  } else {
+    return blaze_util::MakeAbsolute(value);
+  }
+}
+
 void LogWait(unsigned int elapsed_seconds, unsigned int wait_seconds) {
   SigPrintf("WARNING: Waiting for server process to terminate "
             "(waited %d seconds, waiting at most %d)\n",