diff --git a/compiler/src/prog8/CompilerMain.kt b/compiler/src/prog8/CompilerMain.kt index 3ea67d472..aa559280c 100644 --- a/compiler/src/prog8/CompilerMain.kt +++ b/compiler/src/prog8/CompilerMain.kt @@ -35,14 +35,14 @@ fun pathFrom(stringPath: String, vararg rest: String): Path = FileSystems.getDe private fun compileMain(args: Array) { - val cli = ArgParser("prog8compiler") - val startEmulator by cli.option(ArgType.Boolean, shortName="emu", description = "auto-start emulator after successful compilation") - val outputDir by cli.option(ArgType.String, shortName = "out", description = "directory for output files instead of current directory").default(".") - val dontWriteAssembly by cli.option(ArgType.Boolean, shortName = "noasm", description="don't create assembly code") - val dontOptimize by cli.option(ArgType.Boolean, shortName = "noopt", description = "don't perform any optimizations") - val watchMode by cli.option(ArgType.Boolean, shortName = "watch", description = "continuous compilation mode (watches for file changes), greatly increases compilation speed") - val slowCodegenWarnings by cli.option(ArgType.Boolean, shortName = "slowwarn", description="show debug warnings about slow/problematic assembly code generation") - val compilationTarget by cli.option(ArgType.String, shortName = "target", description = "target output of the compiler, currently '${C64Target.name}' and '${Cx16Target.name}' available").default(C64Target.name) + val cli = ArgParser("prog8compiler", prefixStyle = ArgParser.OptionPrefixStyle.JVM) + val startEmulator by cli.option(ArgType.Boolean, fullName = "emu", description = "auto-start emulator after successful compilation") + val outputDir by cli.option(ArgType.String, fullName = "out", description = "directory for output files instead of current directory").default(".") + val dontWriteAssembly by cli.option(ArgType.Boolean, fullName = "noasm", description="don't create assembly code") + val dontOptimize by cli.option(ArgType.Boolean, fullName = "noopt", description = "don't perform any optimizations") + val watchMode by cli.option(ArgType.Boolean, fullName = "watch", description = "continuous compilation mode (watches for file changes), greatly increases compilation speed") + val slowCodegenWarnings by cli.option(ArgType.Boolean, fullName = "slowwarn", description="show debug warnings about slow/problematic assembly code generation") + val compilationTarget by cli.option(ArgType.String, fullName = "target", description = "target output of the compiler, currently '${C64Target.name}' and '${Cx16Target.name}' available").default(C64Target.name) val moduleFiles by cli.argument(ArgType.String, fullName = "modules", description = "main module file(s) to compile").multiple(999) try { diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 672e8f77d..f8f2f55da 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -15,7 +15,6 @@ TODO - use the 65c02 bit clear/set/test instructions for single-bit operations - try to fix the bresenham line routines in graphics and gfx2 (sometimes they're a pixel 'off') - add a flood fill routine to gfx2? -- can we get rid of the --longOptionName command line options and only keep the short versions? https://github.com/Kotlin/kotlinx-cli/issues/50 - add a f_seek() routine for the Cx16 that uses its seek dos api? - optimizer: detect variables that are written but never read - mark those as unused too and remove them, such as uword unused = memory("unused222", 20) - also remove the memory slab allocation - add a compiler option to not remove unused subroutines. this allows for building library programs