8173158: [AOT] fix typo in jaotc --help output
Reviewed-by: rbackman
This commit is contained in:
parent
56be1a28df
commit
94db4c91c3
@ -141,6 +141,32 @@ public class Main implements LogPrinter {
|
||||
}
|
||||
task.options.outputName = name;
|
||||
}
|
||||
}, new Option(" --class-name <class names> List of classes to compile", true, "--class-name", "--classname") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.files.addAll(ClassSearch.makeList(ClassNameSourceProvider.TYPE, arg));
|
||||
}
|
||||
}, new Option(" --jar <jarfiles> List of jar files to compile", true, "--jar") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.files.addAll(ClassSearch.makeList(JarSourceProvider.TYPE, arg));
|
||||
}
|
||||
}, new Option(" --module <modules> List of modules to compile", true, "--module") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.files.addAll(ClassSearch.makeList(ModuleSourceProvider.TYPE, arg));
|
||||
}
|
||||
}, new Option(" --directory <dirs> List of directories where to search for files to compile", true, "--directory") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.files.addAll(ClassSearch.makeList(DirectorySourceProvider.TYPE, arg));
|
||||
}
|
||||
}, new Option(" --search-path <dirs> List of directories where to search for specified files", true, "--search-path") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
String[] elements = arg.split(":");
|
||||
task.options.searchPath.add(elements);
|
||||
}
|
||||
}, new Option(" --compile-commands <file> Name of file with compile commands", true, "--compile-commands") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
@ -151,32 +177,12 @@ public class Main implements LogPrinter {
|
||||
void process(Main task, String opt, String arg) {
|
||||
TieredAOT.setValue(true);
|
||||
}
|
||||
}, new Option(" --compile-with-assertions Compile assertions", false, "--compile-with-assertions") {
|
||||
}, new Option(" --compile-with-assertions Compile with java assertions", false, "--compile-with-assertions") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.compileWithAssertions = true;
|
||||
}
|
||||
}, new Option(" --classname <class names>> Class names to AOT compile (: separated list)", true, "--classname") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.files.addAll(ClassSearch.makeList(ClassNameSourceProvider.TYPE, arg));
|
||||
}
|
||||
}, new Option(" --directory <directories> Directories to search for class files. (: separated list)", true, "--directory") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.files.addAll(ClassSearch.makeList(DirectorySourceProvider.TYPE, arg));
|
||||
}
|
||||
}, new Option(" --jar <jarfiles> Jar files to search for class files. (: separated list)", true, "--jar") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.files.addAll(ClassSearch.makeList(JarSourceProvider.TYPE, arg));
|
||||
}
|
||||
}, new Option(" --module <modules> module names to AOT compile (: separated list)", true, "--module") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.files.addAll(ClassSearch.makeList(ModuleSourceProvider.TYPE, arg));
|
||||
}
|
||||
}, new Option(" --threads <number> Number of compilation threads to be used", true, "--threads") {
|
||||
}, new Option(" --compile-threads <number> Number of compilation threads to be used", true, "--compile-threads", "--threads") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
int threads = Integer.parseInt(arg);
|
||||
@ -228,12 +234,6 @@ public class Main implements LogPrinter {
|
||||
void process(Main task, String opt, String arg) {
|
||||
task.options.version = true;
|
||||
}
|
||||
}, new Option(" --search-path <name> Where to search for jarfiles and modules", true, "--search-path") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
String[] elements = arg.split(":");
|
||||
task.options.searchPath.add(elements);
|
||||
}
|
||||
}, new Option(" -J<flag> Pass <flag> directly to the runtime system", false, "-J") {
|
||||
@Override
|
||||
void process(Main task, String opt, String arg) {
|
||||
@ -639,17 +639,17 @@ public class Main implements LogPrinter {
|
||||
}
|
||||
|
||||
private void showUsage() {
|
||||
log.println("Usage: " + PROGNAME + " <options> list...");
|
||||
log.println("Usage: " + PROGNAME + " <options> list");
|
||||
log.println("use --help for a list of possible options");
|
||||
}
|
||||
|
||||
private void showHelp() {
|
||||
log.println("Usage: " + PROGNAME + " <options> | <list...>");
|
||||
log.println("Usage: " + PROGNAME + " <options> list");
|
||||
log.println();
|
||||
log.println(" list A list of class names, jar files or directories which");
|
||||
log.println(" contains class files.");
|
||||
log.println(" list A : separated list of class names, modules, jar files");
|
||||
log.println(" or directories which contain class files.");
|
||||
log.println();
|
||||
log.println("where possible options include:");
|
||||
log.println("where options include:");
|
||||
for (Option o : recognizedOptions) {
|
||||
String name = o.aliases[0].substring(1); // there must always be at least one name
|
||||
name = name.charAt(0) == '-' ? name.substring(1) : name;
|
||||
|
@ -100,7 +100,7 @@ public class AotCompiler {
|
||||
args.add("--compile-commands");
|
||||
args.add(file.toString());
|
||||
}
|
||||
args.add("--classname");
|
||||
args.add("--class-name");
|
||||
args.add(item);
|
||||
return launchJaotc(args, extraopts);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class ClasspathOptionUnknownClassTest {
|
||||
public static void main(String[] args) {
|
||||
OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--classname", "HelloWorldOne");
|
||||
OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--class-name", "HelloWorldOne");
|
||||
Asserts.assertNE(oa.getExitValue(), 0, "Unexpected compilation exit code");
|
||||
File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
|
||||
Asserts.assertFalse(compiledLibrary.exists(), "Compiler library unexpectedly exists");
|
||||
|
@ -41,7 +41,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
||||
public class CompileClassTest {
|
||||
public static void main(String[] args) {
|
||||
OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--classname", JaotcTestHelper
|
||||
OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--class-name", JaotcTestHelper
|
||||
.getClassAotCompilationName(HelloWorldOne.class));
|
||||
oa.shouldHaveExitValue(0);
|
||||
File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
|
||||
|
@ -45,7 +45,7 @@ public class ListOptionNotExistingTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--compile-commands", "./notExisting.list",
|
||||
"--classname", COMPILE_ITEM);
|
||||
"--class-name", COMPILE_ITEM);
|
||||
int exitCode = oa.getExitValue();
|
||||
Asserts.assertNE(exitCode, 0, "Unexpected compilation exit code");
|
||||
File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
|
||||
|
@ -66,7 +66,7 @@ public class ListOptionTest {
|
||||
throw new Error("TESTBUG: can't write list file " + e, e);
|
||||
}
|
||||
OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--compile-commands", COMPILE_COMMAND_FILE.toString(),
|
||||
"--classname", JaotcTestHelper.getClassAotCompilationName(HelloWorldOne.class));
|
||||
"--class-name", JaotcTestHelper.getClassAotCompilationName(HelloWorldOne.class));
|
||||
oa.shouldHaveExitValue(0);
|
||||
File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
|
||||
Asserts.assertTrue(compiledLibrary.exists(), "Compiled library file missing");
|
||||
|
@ -54,7 +54,7 @@ public class ListOptionWrongFileTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// expecting wrong file to be read but no compilation directive recognized, so, all compiled
|
||||
OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--compile-commands", COMPILE_FILE, "--classname", COMPILE_ITEM);
|
||||
OutputAnalyzer oa = JaotcTestHelper.compileLibrary("--compile-commands", COMPILE_FILE, "--class-name", COMPILE_ITEM);
|
||||
oa.shouldHaveExitValue(0);
|
||||
File compiledLibrary = new File(JaotcTestHelper.DEFAULT_LIB_PATH);
|
||||
Asserts.assertTrue(compiledLibrary.exists(), "Expected compiler library to exist");
|
||||
|
Loading…
Reference in New Issue
Block a user