# HG changeset patch # User kvn # Date 1485307141 28800 # Node ID 67507b173e819f68107c89ef7b7fae2ae54eb03f # Parent 72039e58b2a849a81394327a3e529d0a171aed70 8173158: [AOT] fix typo in jaotc --help output Reviewed-by: rbackman diff -r 72039e58b2a8 -r 67507b173e81 hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java --- a/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java Tue Jan 24 08:51:07 2017 +0000 +++ b/hotspot/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java Tue Jan 24 17:19:01 2017 -0800 @@ -141,6 +141,32 @@ } task.options.outputName = name; } + }, new Option(" --class-name 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 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 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 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 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 Name of file with compile commands", true, "--compile-commands") { @Override void process(Main task, String opt, String arg) { @@ -151,32 +177,12 @@ 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 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 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 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 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 of compilation threads to be used", true, "--threads") { + }, new Option(" --compile-threads 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 @@ void process(Main task, String opt, String arg) { task.options.version = true; } - }, new Option(" --search-path 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 Pass directly to the runtime system", false, "-J") { @Override void process(Main task, String opt, String arg) { @@ -639,17 +639,17 @@ } private void showUsage() { - log.println("Usage: " + PROGNAME + " list..."); + log.println("Usage: " + PROGNAME + " list"); log.println("use --help for a list of possible options"); } private void showHelp() { - log.println("Usage: " + PROGNAME + " | "); + log.println("Usage: " + PROGNAME + " 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; diff -r 72039e58b2a8 -r 67507b173e81 hotspot/test/compiler/aot/AotCompiler.java --- a/hotspot/test/compiler/aot/AotCompiler.java Tue Jan 24 08:51:07 2017 +0000 +++ b/hotspot/test/compiler/aot/AotCompiler.java Tue Jan 24 17:19:01 2017 -0800 @@ -100,7 +100,7 @@ args.add("--compile-commands"); args.add(file.toString()); } - args.add("--classname"); + args.add("--class-name"); args.add(item); return launchJaotc(args, extraopts); } diff -r 72039e58b2a8 -r 67507b173e81 hotspot/test/compiler/aot/cli/jaotc/ClasspathOptionUnknownClassTest.java --- a/hotspot/test/compiler/aot/cli/jaotc/ClasspathOptionUnknownClassTest.java Tue Jan 24 08:51:07 2017 +0000 +++ b/hotspot/test/compiler/aot/cli/jaotc/ClasspathOptionUnknownClassTest.java Tue Jan 24 17:19:01 2017 -0800 @@ -39,7 +39,7 @@ 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"); diff -r 72039e58b2a8 -r 67507b173e81 hotspot/test/compiler/aot/cli/jaotc/CompileClassTest.java --- a/hotspot/test/compiler/aot/cli/jaotc/CompileClassTest.java Tue Jan 24 08:51:07 2017 +0000 +++ b/hotspot/test/compiler/aot/cli/jaotc/CompileClassTest.java Tue Jan 24 17:19:01 2017 -0800 @@ -41,7 +41,7 @@ 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); diff -r 72039e58b2a8 -r 67507b173e81 hotspot/test/compiler/aot/cli/jaotc/ListOptionNotExistingTest.java --- a/hotspot/test/compiler/aot/cli/jaotc/ListOptionNotExistingTest.java Tue Jan 24 08:51:07 2017 +0000 +++ b/hotspot/test/compiler/aot/cli/jaotc/ListOptionNotExistingTest.java Tue Jan 24 17:19:01 2017 -0800 @@ -45,7 +45,7 @@ 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); diff -r 72039e58b2a8 -r 67507b173e81 hotspot/test/compiler/aot/cli/jaotc/ListOptionTest.java --- a/hotspot/test/compiler/aot/cli/jaotc/ListOptionTest.java Tue Jan 24 08:51:07 2017 +0000 +++ b/hotspot/test/compiler/aot/cli/jaotc/ListOptionTest.java Tue Jan 24 17:19:01 2017 -0800 @@ -66,7 +66,7 @@ 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"); diff -r 72039e58b2a8 -r 67507b173e81 hotspot/test/compiler/aot/cli/jaotc/ListOptionWrongFileTest.java --- a/hotspot/test/compiler/aot/cli/jaotc/ListOptionWrongFileTest.java Tue Jan 24 08:51:07 2017 +0000 +++ b/hotspot/test/compiler/aot/cli/jaotc/ListOptionWrongFileTest.java Tue Jan 24 17:19:01 2017 -0800 @@ -54,7 +54,7 @@ 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");