test/hotspot/jtreg/compiler/aot/AotCompiler.java
author erikj
Fri, 09 Mar 2018 19:20:19 +0100
changeset 49201 e59941f7247d
parent 47558 2cce48107f55
child 50524 04f4e983c2f7
permissions -rw-r--r--
8199352: The Jib artifact resolver in test lib needs to print better error messages Reviewed-by: iignatyev, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     1
/*
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     4
 *
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     8
 *
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    13
 * accompanied this code).
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    14
 *
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    18
 *
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    21
 * questions.
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    22
 */
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    23
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    24
package compiler.aot;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    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;
49201
e59941f7247d 8199352: The Jib artifact resolver in test lib needs to print better error messages
erikj
parents: 47558
diff changeset
    29
import jdk.test.lib.artifacts.ArtifactResolverException;
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    30
import jdk.test.lib.process.OutputAnalyzer;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    31
import java.io.File;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    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
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    34
import java.nio.file.Files;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    35
import java.nio.file.Path;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    36
import java.nio.file.Paths;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    37
import java.nio.file.StandardOpenOption;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    38
import java.util.ArrayList;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    39
import java.util.Arrays;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    40
import java.util.List;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    41
import jdk.test.lib.JDKToolLauncher;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    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
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    44
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    45
/**
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    46
 * A simple class calling AOT compiler over requested items
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    47
 */
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    48
public class AotCompiler {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    49
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    50
    private final static String METHODS_LIST_FILENAME = "methodsList.txt";
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    51
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    52
    public static void main(String args[]) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    53
        String className = null;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    54
        List<String> compileList = new ArrayList<>();
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    55
        String libName = null;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    56
        List<String> extraopts = new ArrayList<>();
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    57
        for (int i = 0; i < args.length; i++) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    58
            switch (args[i]) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    59
                case "-class":
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    60
                    className = args[++i];
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    61
                    break;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    62
                case "-compile":
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    63
                    compileList.add("compileOnly " + args[++i]);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    64
                    break;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    65
                case "-libname":
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    66
                    libName = args[++i];
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    67
                    break;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    68
                case "-extraopt":
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    69
                    extraopts.add(args[++i]);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    70
                    break;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    71
                default:
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    72
                    throw new Error("Unknown option: " + args[i]);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    73
            }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    74
        }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    75
        extraopts.add("-classpath");
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    76
        extraopts.add(Utils.TEST_CLASS_PATH + File.pathSeparator + Utils.TEST_SRC);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    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
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    79
            oa.shouldHaveExitValue(0);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    80
        } else {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    81
            printUsage();
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    82
            throw new Error("Mandatory arguments aren't passed");
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    83
        }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    84
    }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    85
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    86
    public static OutputAnalyzer launchCompilerSimple(String... args) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    87
        return launchJaotc(Arrays.asList(args), null);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    88
    }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    89
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    90
    public static OutputAnalyzer launchCompiler(String libName, String item, List<String> extraopts,
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    91
            List<String> compList) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    92
        Path file = null;
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    93
        if (compList != null && !compList.isEmpty()) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    94
            file = Paths.get(METHODS_LIST_FILENAME);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    95
            try {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    96
                Files.write(file, compList, StandardOpenOption.CREATE);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    97
            } catch (IOException e) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    98
                throw new Error("Couldn't write " + METHODS_LIST_FILENAME + " " + e, e);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
    99
            }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   100
        }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   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
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   103
        args.add("--output");
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   104
        args.add(libName);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   105
        if (file != null) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   106
            args.add("--compile-commands");
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   107
            args.add(file.toString());
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   108
        }
43479
67507b173e81 8173158: [AOT] fix typo in jaotc --help output
kvn
parents: 43464
diff changeset
   109
        args.add("--class-name");
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   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
        }
46980
28e20e703392 8186721: AOT tests fail with: section alignment is not valid: 128
kvn
parents: 46826
diff changeset
   116
        // Execute with asserts
28e20e703392 8186721: AOT tests fail with: section alignment is not valid: 128
kvn
parents: 46826
diff changeset
   117
        args.add("-J-ea");
28e20e703392 8186721: AOT tests fail with: section alignment is not valid: 128
kvn
parents: 46826
diff changeset
   118
        args.add("-J-esa");
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   119
        return launchJaotc(args, extraopts);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   120
    }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   121
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   122
    private static OutputAnalyzer launchJaotc(List<String> args, List<String> extraVmOpts) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   123
        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jaotc");
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   124
        for (String vmOpt : Utils.getTestJavaOpts()) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   125
            launcher.addVMArg(vmOpt);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   126
        }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   127
        if (extraVmOpts != null) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   128
            for (String vmOpt : extraVmOpts) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   129
                launcher.addVMArg(vmOpt);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   130
            }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   131
        }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   132
        for (String arg : args) {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   133
            launcher.addToolArg(arg);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   134
        }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   135
        try {
46826
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   136
            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
   137
        } catch (Throwable e) {
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   138
            throw new Error("Can't start test process: " + e, e);
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   139
        }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   140
    }
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   141
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   142
    public static void printUsage() {
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   143
        System.err.println("Usage: " + AotCompiler.class.getName()
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   144
                + " -class <class> -libname <.so name>"
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   145
                + " [-compile <compileItems>]* [-extraopt <java option>]*");
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   146
    }
46826
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   147
47558
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   148
    // runs ld -v (or ld -V on solaris) and check its exit code
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   149
    private static boolean checkLd(Path bin) {
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   150
        try {
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   151
            return 0 == ProcessTools.executeCommand(bin.toString(),
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   152
                                                    Platform.isSolaris() ? "-V" : "-v")
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   153
                                    .getExitValue();
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   154
        } catch (Throwable t) {
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   155
            // any errors mean ld doesn't work
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   156
            return false;
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   157
        }
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   158
    }
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   159
46826
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   160
    public static String resolveLinker() {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   161
        Path linker = null;
47558
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   162
        // if non windows, 1st, check if PATH has ld
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   163
        if (!Platform.isWindows()) {
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   164
            String bin = "ld";
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   165
            for (String path : System.getenv("PATH").split(File.pathSeparator)) {
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   166
                Path ld = Paths.get(path).resolve("ld");
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   167
                if (Files.exists(ld)) {
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   168
                    // there is ld in PATH
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   169
                    if (checkLd(ld)) {
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   170
                        System.out.println("found working linker: " + ld);
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   171
                        // ld works, jaotc is supposed to find and use it
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   172
                        return null;
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   173
                    } else {
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   174
                        System.out.println("found broken linker: " + ld);
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   175
                        // ld exists in PATH, but doesn't work, have to use devkit
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   176
                        break;
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   177
                    }
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   178
                }
46826
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   179
            }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   180
        }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   181
        // 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
   182
        // 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
   183
        try {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   184
            if (Platform.isWindows()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   185
                if (Platform.isX64()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   186
                    @Artifact(organization = "jpg.infra.builddeps",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   187
                            name = "devkit-windows_x64",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   188
                            revision = "VS2013SP4+1.0",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   189
                            extension = "tar.gz")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   190
                    class DevkitWindowsX64 { }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   191
                    String artifactName = "jpg.infra.builddeps."
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   192
                            + "devkit-windows_x64-"
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   193
                            + "VS2013SP4+1.0";
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   194
                    Path devkit = ArtifactResolver.resolve(DevkitWindowsX64.class)
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   195
                                                  .get(artifactName);
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   196
                    linker = devkit.resolve("VC")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   197
                                   .resolve("bin")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   198
                                   .resolve("amd64")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   199
                                   .resolve("link.exe");
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
            } else if (Platform.isOSX()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   202
                @Artifact(organization =  "jpg.infra.builddeps",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   203
                        name = "devkit-macosx_x64",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   204
                        revision = "Xcode6.3-MacOSX10.9+1.0",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   205
                        extension = "tar.gz")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   206
                class DevkitMacosx { }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   207
                String artifactName = "jpg.infra.builddeps."
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   208
                        + "devkit-macosx_x64-"
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   209
                        + "Xcode6.3-MacOSX10.9+1.0";
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   210
                Path devkit = ArtifactResolver.resolve(DevkitMacosx.class)
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   211
                                              .get(artifactName);
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   212
                linker = devkit.resolve("Xcode.app")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   213
                               .resolve("Contents")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   214
                               .resolve("Developer")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   215
                               .resolve("Toolchains")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   216
                               .resolve("XcodeDefault.xctoolchain")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   217
                               .resolve("usr")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   218
                               .resolve("bin")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   219
                               .resolve("ld");
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   220
            } else if (Platform.isSolaris()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   221
                if (Platform.isSparc()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   222
                    @Artifact(organization =  "jpg.infra.builddeps",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   223
                            name = "devkit-solaris_sparcv9",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   224
                            revision = "SS12u4-Solaris11u1+1.0",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   225
                            extension = "tar.gz")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   226
                    class DevkitSolarisSparc { }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   227
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   228
                    String artifactName = "jpg.infra.builddeps."
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   229
                            + "devkit-solaris_sparcv9-"
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   230
                            + "SS12u4-Solaris11u1+1.0";
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   231
                    Path devkit = ArtifactResolver.resolve(DevkitSolarisSparc.class)
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   232
                                                  .get(artifactName);
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   233
                    linker = devkit.resolve("SS12u4-Solaris11u1")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   234
                                   .resolve("gnu")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   235
                                   .resolve("bin")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   236
                                   .resolve("ld");
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   237
                } else if (Platform.isX64()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   238
                    @Artifact(organization =  "jpg.infra.builddeps",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   239
                            name = "devkit-solaris_x64",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   240
                            revision = "SS12u4-Solaris11u1+1.0",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   241
                            extension = "tar.gz")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   242
                    class DevkitSolarisX64 { }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   243
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   244
                    String artifactName = "jpg.infra.builddeps."
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   245
                            + "devkit-solaris_x64-"
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   246
                            + "SS12u4-Solaris11u1+1.0";
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   247
                    Path devkit = ArtifactResolver.resolve(DevkitSolarisX64.class)
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   248
                                                  .get(artifactName);
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   249
                    linker = devkit.resolve("SS12u4-Solaris11u1")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   250
                                   .resolve("bin")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   251
                                   .resolve("amd64")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   252
                                   .resolve("ld");
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   253
                }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   254
            } else if (Platform.isLinux()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   255
                if (Platform.isAArch64()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   256
                    @Artifact(organization = "jpg.infra.builddeps",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   257
                            name = "devkit-linux_aarch64",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   258
                            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
   259
                            extension = "tar.gz")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   260
                    class DevkitLinuxAArch64 { }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   261
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   262
                    String artifactName = "jpg.infra.builddeps."
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   263
                            + "devkit-linux_aarch64-"
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   264
                            + "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
   265
                    Path devkit = ArtifactResolver.resolve(DevkitLinuxAArch64.class)
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   266
                                                  .get(artifactName);
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   267
                    linker = devkit.resolve("aarch64-linux-gnu")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   268
                                   .resolve("bin")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   269
                                   .resolve("ld");
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   270
                } else if (Platform.isARM()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   271
                    @Artifact(organization = "jpg.infra.builddeps",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   272
                            name = "devkit-linux_arm",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   273
                            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
   274
                            extension = "tar.gz")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   275
                    class DevkitLinuxARM { }
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
                    String artifactName = "jpg.infra.builddeps."
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   278
                            + "devkit-linux_arm-"
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   279
                            + "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
   280
                    Path devkit = ArtifactResolver.resolve(DevkitLinuxARM.class)
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   281
                                                  .get(artifactName);
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   282
                    linker = devkit.resolve("arm-linux-gnueabihf")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   283
                                   .resolve("bin")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   284
                                   .resolve("ld");
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   285
                } else if (Platform.isX64()) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   286
                    @Artifact(organization = "jpg.infra.builddeps",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   287
                            name = "devkit-linux_x64",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   288
                            revision = "gcc4.9.2-OEL6.4+1.1",
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   289
                            extension = "tar.gz")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   290
                    class DevkitLinuxX64 { }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   291
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   292
                    String artifactName = "jpg.infra.builddeps."
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   293
                            + "devkit-linux_x64-"
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   294
                            + "gcc4.9.2-OEL6.4+1.1";
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   295
                    Path devkit = ArtifactResolver.resolve(DevkitLinuxX64.class)
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   296
                                                  .get(artifactName);
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   297
                    linker = devkit.resolve("bin")
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   298
                                   .resolve("ld");
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   299
                }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   300
            }
49201
e59941f7247d 8199352: The Jib artifact resolver in test lib needs to print better error messages
erikj
parents: 47558
diff changeset
   301
        } catch (ArtifactResolverException e) {
47558
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   302
            System.err.println("artifact resolution error: " + e);
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   303
            // let jaotc try to find linker
2cce48107f55 8187020: AOT tests should not fail if devkit dependency isn't resolved
iignatyev
parents: 47216
diff changeset
   304
            return null;
46826
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   305
        }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   306
        if (linker != null) {
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   307
            return linker.toAbsolutePath().toString();
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   308
        }
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   309
        return null;
dae7992b1615 8183337: hotspot/compiler/aot tests fail due to missed tools
iignatyev
parents: 43479
diff changeset
   310
    }
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents:
diff changeset
   311
}