8211740: [AOT] -XX:AOTLibrary doesn't accept windows path
Reviewed-by: kvn, iignatyev
This commit is contained in:
parent
497de20391
commit
6a7fdffe3b
@ -137,6 +137,12 @@ void AOTLoader::initialize() {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS
|
||||
const char pathSep = ';';
|
||||
#else
|
||||
const char pathSep = ':';
|
||||
#endif
|
||||
|
||||
// Scan the AOTLibrary option.
|
||||
if (AOTLibrary != NULL) {
|
||||
const int len = (int)strlen(AOTLibrary);
|
||||
@ -147,7 +153,7 @@ void AOTLoader::initialize() {
|
||||
char* end = cp + len;
|
||||
while (cp < end) {
|
||||
const char* name = cp;
|
||||
while ((*cp) != '\0' && (*cp) != '\n' && (*cp) != ',' && (*cp) != ':' && (*cp) != ';') cp++;
|
||||
while ((*cp) != '\0' && (*cp) != '\n' && (*cp) != ',' && (*cp) != pathSep) cp++;
|
||||
cp[0] = '\0'; // Terminate name
|
||||
cp++;
|
||||
load_library(name, true);
|
||||
|
@ -54,6 +54,7 @@
|
||||
package compiler.aot.cli;
|
||||
|
||||
import compiler.aot.HelloWorldPrinter;
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import jdk.test.lib.process.ExitCode;
|
||||
import jdk.test.lib.cli.CommandLineOptionTest;
|
||||
@ -75,8 +76,11 @@ public final class MultipleAOTLibraryTest {
|
||||
boolean addTestVMOptions = true;
|
||||
String[] allArgs = Arrays.copyOf(args, args.length + 4);
|
||||
allArgs[args.length] = "-XX:AOTLibrary="
|
||||
+ "./libMultipleAOTLibraryTest1.so:"
|
||||
+ "./libMultipleAOTLibraryTest2.so";
|
||||
+ "." + File.separator
|
||||
+ "libMultipleAOTLibraryTest1.so"
|
||||
+ File.pathSeparator
|
||||
+ "." + File.separator
|
||||
+ "libMultipleAOTLibraryTest2.so";
|
||||
allArgs[args.length + 1] = "-XX:+PrintAOT";
|
||||
allArgs[args.length + 2] = "-XX:+UseAOT";
|
||||
allArgs[args.length + 3] = HelloWorldPrinter.class.getName();
|
||||
|
Loading…
Reference in New Issue
Block a user