Lexically sort compiler option definitions.

This commit is contained in:
Alexander Gorshenev
2017-05-23 15:29:03 +03:00
committed by alexander-gorshenev
parent a56a53f408
commit 34491cfb01
@@ -20,41 +20,9 @@ import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments;
import org.jetbrains.kotlin.cli.common.arguments.Argument; import org.jetbrains.kotlin.cli.common.arguments.Argument;
public class K2NativeCompilerArguments extends CommonCompilerArguments { public class K2NativeCompilerArguments extends CommonCompilerArguments {
@Argument(value = "-output", shortName = "-o", valueDescription = "<path>", description = "Output file path") // First go the options interesting to the general public.
public String outputFile; // Prepend them with a single dash.
// Keep the list lexically sorted.
@Argument(value = "-runtime", valueDescription = "<path>", description = "Override standard 'runtime.bc' location")
public String runtimeFile;
@Argument(value = "-properties", valueDescription = "<path>", description = "Override standard 'konan.properties' location")
public String propertyFile;
@Argument(value = "-library", shortName = "-l", valueDescription = "<path>", description = "Link with the library")
public String[] libraries;
@Argument(value = "-nativelibrary", shortName = "-nl", valueDescription = "<path>", description = "Include the native library")
public String[] nativeLibraries;
@Argument(value = "-nolink", description = "Don't link, just produce a bitcode file")
public boolean nolink;
@Argument(value = "-nopack", description = "Don't pack the library into a klib file")
public boolean nopack;
@Argument(value = "-nomain", description = "Assume 'main' entry point to be provided by external libraries")
public boolean nomain;
@Argument(value = "-linkerArgs", valueDescription = "<arg>", description = "Pass arguments to linker", delimiter = " ")
public String[] linkerArguments;
@Argument(value = "-nostdlib", description = "Don't link with stdlib")
public boolean nostdlib;
@Argument(value = "-opt", description = "Enable optimizations during compilation")
public boolean optimization;
@Argument(value = "-target", valueDescription = "<target>", description = "Set hardware target")
public String target;
@Argument(value = "-g", description = "Enable emitting debug information") @Argument(value = "-g", description = "Enable emitting debug information")
public boolean debug; public boolean debug;
@@ -62,38 +30,51 @@ public class K2NativeCompilerArguments extends CommonCompilerArguments {
@Argument(value = "-enable_assertions", shortName = "-ea", description = "Enable runtime assertions in generated code") @Argument(value = "-enable_assertions", shortName = "-ea", description = "Enable runtime assertions in generated code")
public boolean enableAssertions; public boolean enableAssertions;
// The rest of the options are only interesting for developers. @Argument(value = "-library", shortName = "-l", valueDescription = "<path>", description = "Link with the library")
// Make sure to prepend them with double dash. public String[] libraries;
@Argument(value = "-linkerArgs", valueDescription = "<arg>", description = "Pass arguments to linker", delimiter = " ")
public String[] linkerArguments;
@Argument(value = "-list_targets", description = "List available hardware targets") @Argument(value = "-list_targets", description = "List available hardware targets")
public boolean listTargets; public boolean listTargets;
@Argument(value = "--print_ir", description = "Print IR") @Argument(value = "-nativelibrary", shortName = "-nl", valueDescription = "<path>", description = "Include the native library")
public boolean printIr; public String[] nativeLibraries;
@Argument(value = "--print_ir_with_descriptors", description = "Print IR with descriptors") @Argument(value = "-nolink", description = "Don't link, just produce a bitcode file")
public boolean printIrWithDescriptors; public boolean nolink;
@Argument(value = "--print_descriptors", description = "Print descriptor tree") @Argument(value = "-nomain", description = "Assume 'main' entry point to be provided by external libraries")
public boolean printDescriptors; public boolean nomain;
@Argument(value = "--print_locations", description = "Print locations") @Argument(value = "-nopack", description = "Don't pack the library into a klib file")
public boolean printLocations; public boolean nopack;
@Argument(value = "--print_bitcode", description = "Print llvm bitcode") @Argument(value = "-nostdlib", description = "Don't link with stdlib")
public boolean printBitCode; public boolean nostdlib;
@Argument(value = "-opt", description = "Enable optimizations during compilation")
public boolean optimization;
@Argument(value = "-output", shortName = "-o", valueDescription = "<path>", description = "Output file path")
public String outputFile;
@Argument(value = "-properties", valueDescription = "<path>", description = "Override standard 'konan.properties' location")
public String propertyFile;
@Argument(value = "-repo", shortName = "-r", valueDescription = "<path>", description = "Library search path") @Argument(value = "-repo", shortName = "-r", valueDescription = "<path>", description = "Library search path")
public String[] repositories; public String[] repositories;
@Argument(value = "--verify_ir", description = "Verify IR") @Argument(value = "-runtime", valueDescription = "<path>", description = "Override standard 'runtime.bc' location")
public boolean verifyIr; public String runtimeFile;
@Argument(value = "--verify_descriptors", description = "Verify descriptor tree") @Argument(value = "-target", valueDescription = "<target>", description = "Set hardware target")
public boolean verifyDescriptors; public String target;
@Argument(value = "--verify_bitcode", description = "Verify llvm bitcode after each method") // The rest of the options are only interesting to the developers.
public boolean verifyBitCode; // Make sure to prepend them with a double dash.
// Keep the list lexically sorted.
@Argument(value = "--enable", valueDescription = "<Phase>", description = "Enable backend phase") @Argument(value = "--enable", valueDescription = "<Phase>", description = "Enable backend phase")
public String[] enablePhases; public String[] enablePhases;
@@ -101,12 +82,37 @@ public class K2NativeCompilerArguments extends CommonCompilerArguments {
@Argument(value = "--disable", valueDescription = "<Phase>", description = "Disable backend phase") @Argument(value = "--disable", valueDescription = "<Phase>", description = "Disable backend phase")
public String[] disablePhases; public String[] disablePhases;
@Argument(value = "--verbose", valueDescription = "<Phase>", description = "Trace phase execution")
public String[] verbosePhases;
@Argument(value = "--list_phases", description = "List all backend phases") @Argument(value = "--list_phases", description = "List all backend phases")
public boolean listPhases; public boolean listPhases;
@Argument(value = "--print_bitcode", description = "Print llvm bitcode")
public boolean printBitCode;
@Argument(value = "--print_descriptors", description = "Print descriptor tree")
public boolean printDescriptors;
@Argument(value = "--print_ir", description = "Print IR")
public boolean printIr;
@Argument(value = "--print_ir_with_descriptors", description = "Print IR with descriptors")
public boolean printIrWithDescriptors;
@Argument(value = "--print_locations", description = "Print locations")
public boolean printLocations;
@Argument(value = "--time", description = "Report execution time for compiler phases") @Argument(value = "--time", description = "Report execution time for compiler phases")
public boolean timePhases; public boolean timePhases;
@Argument(value = "--verbose", valueDescription = "<Phase>", description = "Trace phase execution")
public String[] verbosePhases;
@Argument(value = "--verify_bitcode", description = "Verify llvm bitcode after each method")
public boolean verifyBitCode;
@Argument(value = "--verify_descriptors", description = "Verify descriptor tree")
public boolean verifyDescriptors;
@Argument(value = "--verify_ir", description = "Verify IR")
public boolean verifyIr;
} }