Use JavaIoFileSystem during the bootstrapping, removing JNI compilation.
Another step towards no C++ compilation outside of Bazel for bootstrapping.
--
MOS_MIGRATED_REVID=112399835
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
index 84c7da2..7979266 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
@@ -987,6 +987,10 @@
}
private static FileSystem fileSystemImplementation() {
+ if ("0".equals(System.getProperty("io.bazel.UnixFileSystem"))) {
+ // Ignore UnixFileSystem, to be used for bootstrapping.
+ return new JavaIoFileSystem();
+ }
// The JNI-based UnixFileSystem is faster, but on Windows it is not available.
return OS.getCurrent() == OS.WINDOWS ? new JavaIoFileSystem() : new UnixFileSystem();
}