< prev index next >

src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java

Print this page




 113         if (linkerCheck != null) {
 114             Process p = Runtime.getRuntime().exec(linkerCheck);
 115             final int exitCode = p.waitFor();
 116             if (exitCode != 0) {
 117                 throw new InternalError(getString(p.getErrorStream()));
 118             }
 119         }
 120     }
 121 
 122     void link() throws Exception {
 123         Process p = Runtime.getRuntime().exec(linkerCmd);
 124         final int exitCode = p.waitFor();
 125         if (exitCode != 0) {
 126             String errorMessage = getString(p.getErrorStream());
 127             if (errorMessage.isEmpty()) {
 128                 errorMessage = getString(p.getInputStream());
 129             }
 130             throw new InternalError(errorMessage);
 131         }
 132         File objFile = new File(objectFileName);
 133         if (objFile.exists()) {
 134             if (!objFile.delete()) {
 135                 throw new InternalError("Failed to delete " + objectFileName + " file");
 136             }
 137         }
 138         // Make non-executable for all.
 139         File libFile = new File(libraryFileName);
 140         if (libFile.exists() && !options.osName.startsWith("Windows")) {
 141             if (!libFile.setExecutable(false, false)) {
 142                 throw new InternalError("Failed to change attribute for " + libraryFileName + " file");
 143             }
 144         }
 145 
 146     }
 147 
 148     /**
 149      * Visual Studio supported versions Search Order is: VS2013, VS2015, VS2012
 150      */
 151     public enum VSVERSIONS {
 152         VS2013("VS120COMNTOOLS", "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64\\link.exe"),
 153         VS2015("VS140COMNTOOLS", "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\link.exe"),




 113         if (linkerCheck != null) {
 114             Process p = Runtime.getRuntime().exec(linkerCheck);
 115             final int exitCode = p.waitFor();
 116             if (exitCode != 0) {
 117                 throw new InternalError(getString(p.getErrorStream()));
 118             }
 119         }
 120     }
 121 
 122     void link() throws Exception {
 123         Process p = Runtime.getRuntime().exec(linkerCmd);
 124         final int exitCode = p.waitFor();
 125         if (exitCode != 0) {
 126             String errorMessage = getString(p.getErrorStream());
 127             if (errorMessage.isEmpty()) {
 128                 errorMessage = getString(p.getInputStream());
 129             }
 130             throw new InternalError(errorMessage);
 131         }
 132         File objFile = new File(objectFileName);
 133         if (objFile.exists() && System.getenv("DO_NOT_DELETE_PRECIOUS_FILE") == null) {
 134             if (!objFile.delete()) {
 135                 throw new InternalError("Failed to delete " + objectFileName + " file");
 136             }
 137         }
 138         // Make non-executable for all.
 139         File libFile = new File(libraryFileName);
 140         if (libFile.exists() && !options.osName.startsWith("Windows")) {
 141             if (!libFile.setExecutable(false, false)) {
 142                 throw new InternalError("Failed to change attribute for " + libraryFileName + " file");
 143             }
 144         }
 145 
 146     }
 147 
 148     /**
 149      * Visual Studio supported versions Search Order is: VS2013, VS2015, VS2012
 150      */
 151     public enum VSVERSIONS {
 152         VS2013("VS120COMNTOOLS", "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64\\link.exe"),
 153         VS2015("VS140COMNTOOLS", "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\link.exe"),


< prev index next >