aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2016-01-18 12:53:39 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2016-01-18 14:35:05 +0000
commit8c04e9e0b5ae55107460a3be73d09f2402c51580 (patch)
treeaa64b22c130c7488861602583de8228294eff283 /src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
parentec758db4e5ef5e74708cea6751ab50ea492a201e (diff)
Use JavaIoFileSystem during the bootstrapping, removing JNI compilation.
Another step towards no C++ compilation outside of Bazel for bootstrapping. -- MOS_MIGRATED_REVID=112399835
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java4
1 files changed, 4 insertions, 0 deletions
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 84c7da2455..79792665d5 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 @@ public final class BlazeRuntime {
}
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();
}