author | iignatyev |
Fri, 18 Aug 2017 14:54:43 -0700 | |
changeset 46826 | dae7992b1615 |
parent 43479 | 67507b173e81 |
child 46980 | 28e20e703392 |
permissions | -rw-r--r-- |
42650 | 1 |
/* |
2 |
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
package compiler.aot; |
|
25 |
||
46826
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
26 |
import jdk.test.lib.Platform; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
27 |
import jdk.test.lib.artifacts.Artifact; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
28 |
import jdk.test.lib.artifacts.ArtifactResolver; |
42650 | 29 |
import jdk.test.lib.process.OutputAnalyzer; |
30 |
import java.io.File; |
|
46826
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
31 |
import java.io.FileNotFoundException; |
42650 | 32 |
import java.io.IOException; |
46826
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
33 |
import java.lang.annotation.Annotation; |
42650 | 34 |
import java.nio.file.Files; |
35 |
import java.nio.file.Path; |
|
36 |
import java.nio.file.Paths; |
|
37 |
import java.nio.file.StandardOpenOption; |
|
38 |
import java.util.ArrayList; |
|
39 |
import java.util.Arrays; |
|
40 |
import java.util.List; |
|
41 |
import jdk.test.lib.JDKToolLauncher; |
|
42 |
import jdk.test.lib.Utils; |
|
46826
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
43 |
import jdk.test.lib.process.ProcessTools; |
42650 | 44 |
|
45 |
/** |
|
46 |
* A simple class calling AOT compiler over requested items |
|
47 |
*/ |
|
48 |
public class AotCompiler { |
|
49 |
||
50 |
private final static String METHODS_LIST_FILENAME = "methodsList.txt"; |
|
51 |
||
52 |
public static void main(String args[]) { |
|
53 |
String className = null; |
|
54 |
List<String> compileList = new ArrayList<>(); |
|
55 |
String libName = null; |
|
56 |
List<String> extraopts = new ArrayList<>(); |
|
57 |
for (int i = 0; i < args.length; i++) { |
|
58 |
switch (args[i]) { |
|
59 |
case "-class": |
|
60 |
className = args[++i]; |
|
61 |
break; |
|
62 |
case "-compile": |
|
63 |
compileList.add("compileOnly " + args[++i]); |
|
64 |
break; |
|
65 |
case "-libname": |
|
66 |
libName = args[++i]; |
|
67 |
break; |
|
68 |
case "-extraopt": |
|
69 |
extraopts.add(args[++i]); |
|
70 |
break; |
|
71 |
default: |
|
72 |
throw new Error("Unknown option: " + args[i]); |
|
73 |
} |
|
74 |
} |
|
75 |
extraopts.add("-classpath"); |
|
76 |
extraopts.add(Utils.TEST_CLASS_PATH + File.pathSeparator + Utils.TEST_SRC); |
|
77 |
if (className != null && libName != null) { |
|
43464
f38fde4a6b52
8169588: [AOT] jaotc --classpath option is confusing
rbackman
parents:
43425
diff
changeset
|
78 |
OutputAnalyzer oa = launchCompiler(libName, className, extraopts, compileList); |
42650 | 79 |
oa.shouldHaveExitValue(0); |
80 |
} else { |
|
81 |
printUsage(); |
|
82 |
throw new Error("Mandatory arguments aren't passed"); |
|
83 |
} |
|
84 |
} |
|
85 |
||
86 |
public static OutputAnalyzer launchCompilerSimple(String... args) { |
|
87 |
return launchJaotc(Arrays.asList(args), null); |
|
88 |
} |
|
89 |
||
90 |
public static OutputAnalyzer launchCompiler(String libName, String item, List<String> extraopts, |
|
91 |
List<String> compList) { |
|
92 |
Path file = null; |
|
93 |
if (compList != null && !compList.isEmpty()) { |
|
94 |
file = Paths.get(METHODS_LIST_FILENAME); |
|
95 |
try { |
|
96 |
Files.write(file, compList, StandardOpenOption.CREATE); |
|
97 |
} catch (IOException e) { |
|
98 |
throw new Error("Couldn't write " + METHODS_LIST_FILENAME + " " + e, e); |
|
99 |
} |
|
100 |
} |
|
101 |
List<String> args = new ArrayList<>(); |
|
43425
c5dc48e6d9e6
8172054: Aot tests should include Java assertions into AOT compiled code
kvn
parents:
42650
diff
changeset
|
102 |
args.add("--compile-with-assertions"); |
42650 | 103 |
args.add("--output"); |
104 |
args.add(libName); |
|
105 |
if (file != null) { |
|
106 |
args.add("--compile-commands"); |
|
107 |
args.add(file.toString()); |
|
108 |
} |
|
43479 | 109 |
args.add("--class-name"); |
42650 | 110 |
args.add(item); |
46826
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
111 |
String linker = resolveLinker(); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
112 |
if (linker != null) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
113 |
args.add("--linker-path"); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
114 |
args.add(linker); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
115 |
} |
42650 | 116 |
return launchJaotc(args, extraopts); |
117 |
} |
|
118 |
||
119 |
private static OutputAnalyzer launchJaotc(List<String> args, List<String> extraVmOpts) { |
|
120 |
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jaotc"); |
|
121 |
for (String vmOpt : Utils.getTestJavaOpts()) { |
|
122 |
launcher.addVMArg(vmOpt); |
|
123 |
} |
|
124 |
if (extraVmOpts != null) { |
|
125 |
for (String vmOpt : extraVmOpts) { |
|
126 |
launcher.addVMArg(vmOpt); |
|
127 |
} |
|
128 |
} |
|
129 |
for (String arg : args) { |
|
130 |
launcher.addToolArg(arg); |
|
131 |
} |
|
132 |
try { |
|
46826
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
133 |
return ProcessTools.executeCommand(new ProcessBuilder(launcher.getCommand()).redirectErrorStream(true)); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
134 |
} catch (Throwable e) { |
42650 | 135 |
throw new Error("Can't start test process: " + e, e); |
136 |
} |
|
137 |
} |
|
138 |
||
139 |
public static void printUsage() { |
|
140 |
System.err.println("Usage: " + AotCompiler.class.getName() |
|
141 |
+ " -class <class> -libname <.so name>" |
|
142 |
+ " [-compile <compileItems>]* [-extraopt <java option>]*"); |
|
143 |
} |
|
46826
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
144 |
|
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
145 |
public static String resolveLinker() { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
146 |
Path linker = null; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
147 |
// 1st, check if PATH has ld |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
148 |
for (String path : System.getenv("PATH").split(File.pathSeparator)) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
149 |
if (Files.exists(Paths.get(path).resolve("ld"))) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
150 |
// there is ld in PATH, jaotc is supposed to find it by its own |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
151 |
return null; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
152 |
} |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
153 |
} |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
154 |
// there is no ld in PATH, will use ld from devkit |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
155 |
// artifacts are got from common/conf/jib-profiles.js |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
156 |
try { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
157 |
if (Platform.isWindows()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
158 |
if (Platform.isX64()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
159 |
@Artifact(organization = "jpg.infra.builddeps", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
160 |
name = "devkit-windows_x64", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
161 |
revision = "VS2013SP4+1.0", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
162 |
extension = "tar.gz") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
163 |
class DevkitWindowsX64 { } |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
164 |
String artifactName = "jpg.infra.builddeps." |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
165 |
+ "devkit-windows_x64-" |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
166 |
+ "VS2013SP4+1.0"; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
167 |
Path devkit = ArtifactResolver.resolve(DevkitWindowsX64.class) |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
168 |
.get(artifactName); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
169 |
linker = devkit.resolve("VC") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
170 |
.resolve("bin") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
171 |
.resolve("amd64") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
172 |
.resolve("link.exe"); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
173 |
} |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
174 |
} else if (Platform.isOSX()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
175 |
@Artifact(organization = "jpg.infra.builddeps", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
176 |
name = "devkit-macosx_x64", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
177 |
revision = "Xcode6.3-MacOSX10.9+1.0", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
178 |
extension = "tar.gz") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
179 |
class DevkitMacosx { } |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
180 |
String artifactName = "jpg.infra.builddeps." |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
181 |
+ "devkit-macosx_x64-" |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
182 |
+ "Xcode6.3-MacOSX10.9+1.0"; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
183 |
Path devkit = ArtifactResolver.resolve(DevkitMacosx.class) |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
184 |
.get(artifactName); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
185 |
linker = devkit.resolve("Xcode.app") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
186 |
.resolve("Contents") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
187 |
.resolve("Developer") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
188 |
.resolve("Toolchains") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
189 |
.resolve("XcodeDefault.xctoolchain") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
190 |
.resolve("usr") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
191 |
.resolve("bin") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
192 |
.resolve("ld"); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
193 |
} else if (Platform.isSolaris()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
194 |
if (Platform.isSparc()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
195 |
@Artifact(organization = "jpg.infra.builddeps", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
196 |
name = "devkit-solaris_sparcv9", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
197 |
revision = "SS12u4-Solaris11u1+1.0", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
198 |
extension = "tar.gz") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
199 |
class DevkitSolarisSparc { } |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
200 |
|
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
201 |
String artifactName = "jpg.infra.builddeps." |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
202 |
+ "devkit-solaris_sparcv9-" |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
203 |
+ "SS12u4-Solaris11u1+1.0"; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
204 |
Path devkit = ArtifactResolver.resolve(DevkitSolarisSparc.class) |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
205 |
.get(artifactName); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
206 |
linker = devkit.resolve("SS12u4-Solaris11u1") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
207 |
.resolve("gnu") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
208 |
.resolve("bin") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
209 |
.resolve("ld"); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
210 |
} else if (Platform.isX64()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
211 |
@Artifact(organization = "jpg.infra.builddeps", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
212 |
name = "devkit-solaris_x64", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
213 |
revision = "SS12u4-Solaris11u1+1.0", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
214 |
extension = "tar.gz") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
215 |
class DevkitSolarisX64 { } |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
216 |
|
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
217 |
String artifactName = "jpg.infra.builddeps." |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
218 |
+ "devkit-solaris_x64-" |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
219 |
+ "SS12u4-Solaris11u1+1.0"; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
220 |
Path devkit = ArtifactResolver.resolve(DevkitSolarisX64.class) |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
221 |
.get(artifactName); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
222 |
linker = devkit.resolve("SS12u4-Solaris11u1") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
223 |
.resolve("bin") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
224 |
.resolve("amd64") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
225 |
.resolve("ld"); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
226 |
} |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
227 |
} else if (Platform.isLinux()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
228 |
if (Platform.isAArch64()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
229 |
@Artifact(organization = "jpg.infra.builddeps", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
230 |
name = "devkit-linux_aarch64", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
231 |
revision = "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
232 |
extension = "tar.gz") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
233 |
class DevkitLinuxAArch64 { } |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
234 |
|
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
235 |
String artifactName = "jpg.infra.builddeps." |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
236 |
+ "devkit-linux_aarch64-" |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
237 |
+ "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0"; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
238 |
Path devkit = ArtifactResolver.resolve(DevkitLinuxAArch64.class) |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
239 |
.get(artifactName); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
240 |
linker = devkit.resolve("aarch64-linux-gnu") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
241 |
.resolve("bin") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
242 |
.resolve("ld"); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
243 |
} else if (Platform.isARM()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
244 |
@Artifact(organization = "jpg.infra.builddeps", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
245 |
name = "devkit-linux_arm", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
246 |
revision = "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
247 |
extension = "tar.gz") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
248 |
class DevkitLinuxARM { } |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
249 |
|
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
250 |
String artifactName = "jpg.infra.builddeps." |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
251 |
+ "devkit-linux_arm-" |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
252 |
+ "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
253 |
Path devkit = ArtifactResolver.resolve(DevkitLinuxARM.class) |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
254 |
.get(artifactName); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
255 |
linker = devkit.resolve("arm-linux-gnueabihf") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
256 |
.resolve("bin") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
257 |
.resolve("ld"); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
258 |
} else if (Platform.isX64()) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
259 |
@Artifact(organization = "jpg.infra.builddeps", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
260 |
name = "devkit-linux_x64", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
261 |
revision = "gcc4.9.2-OEL6.4+1.1", |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
262 |
extension = "tar.gz") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
263 |
class DevkitLinuxX64 { } |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
264 |
|
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
265 |
String artifactName = "jpg.infra.builddeps." |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
266 |
+ "devkit-linux_x64-" |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
267 |
+ "gcc4.9.2-OEL6.4+1.1"; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
268 |
Path devkit = ArtifactResolver.resolve(DevkitLinuxX64.class) |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
269 |
.get(artifactName); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
270 |
linker = devkit.resolve("bin") |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
271 |
.resolve("ld"); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
272 |
} |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
273 |
} |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
274 |
} catch (FileNotFoundException e) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
275 |
throw new Error("artifact resolution error: " + e, e); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
276 |
} |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
277 |
if (linker != null) { |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
278 |
return linker.toAbsolutePath().toString(); |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
279 |
} |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
280 |
return null; |
dae7992b1615
8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents:
43479
diff
changeset
|
281 |
} |
42650 | 282 |
} |