diff options
author | 2017-02-28 10:42:48 +0000 | |
---|---|---|
committer | 2017-02-28 11:33:37 +0000 | |
commit | 8afbd3c65339665992ece415e268955394507559 (patch) | |
tree | d1b0b8e4ebfecf730dea30fcdba4b68b4220bfbd /src/main/java/com/google/devtools/build/lib/util | |
parent | a843d216f9f54af27a8d1b5f605e5f5378e4714a (diff) |
Move UnixFileSystem to lib.unix, WindowsFileSystem to lib.windows
--
PiperOrigin-RevId: 148749485
MOS_MIGRATED_REVID=148749485
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/util')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/util/OsUtils.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/util/OsUtils.java b/src/main/java/com/google/devtools/build/lib/util/OsUtils.java index 85c892046d..a25e64bac2 100644 --- a/src/main/java/com/google/devtools/build/lib/util/OsUtils.java +++ b/src/main/java/com/google/devtools/build/lib/util/OsUtils.java @@ -14,8 +14,6 @@ package com.google.devtools.build.lib.util; -import com.google.devtools.build.lib.vfs.PathFragment; - /** * Operating system-specific utilities. */ @@ -34,40 +32,4 @@ public final class OsUtils { public static String executableExtension() { return EXECUTABLE_EXTENSION; } - - /** - * Loads JNI libraries, if necessary under the current platform. - */ - public static void maybeForceJNI(PathFragment installBase) { - if (jniLibsAvailable()) { - forceJNI(installBase); - } - } - - private static boolean jniLibsAvailable() { - return !"0".equals(System.getProperty("io.bazel.EnableJni")); - } - - // Force JNI linking at a moment when we have 'installBase' handy, and print - // an informative error if it fails. - private static void forceJNI(PathFragment installBase) { - try { - ProcessUtils.getpid(); // force JNI initialization - } catch (UnsatisfiedLinkError t) { - System.err.println("JNI initialization failed: " + t.getMessage() + ". " - + "Possibly your installation has been corrupted; " - + "if this problem persists, try 'rm -fr " + installBase + "'."); - throw t; - } - } - - /** - * Returns the PID of the current process, or -1 if not available. - */ - public static int getpid() { - if (jniLibsAvailable()) { - return ProcessUtils.getpid(); - } - return -1; - } } |