Introduced -target and -list_targets flags.

Use it like

    $ konanc hello.kt -target iphone
This commit is contained in:
Alexander Gorshenev
2017-01-13 16:38:40 +03:00
committed by alexander-gorshenev
parent d31b44135a
commit afaa50ce34
21 changed files with 458 additions and 250 deletions
@@ -77,11 +77,13 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
put(EXECUTABLE_FILE,
arguments.outputFile ?: "program.kexe")
put(RUNTIME_FILE,
arguments.runtimeFile ?: Distribution.runtime)
put(PROPERTY_FILE,
arguments.propertyFile ?: Distribution.propertyFile)
if (arguments.runtimeFile != null)
put(RUNTIME_FILE, arguments.runtimeFile)
if (arguments.propertyFile != null)
put(PROPERTY_FILE, arguments.propertyFile)
if (arguments.target != null)
put(TARGET, arguments.target)
put(LIST_TARGETS, arguments.listTargets)
put(OPTIMIZATION, arguments.optimization)
put(PRINT_IR, arguments.printIr)
@@ -30,6 +30,13 @@ public class K2NativeCompilerArguments extends CommonCompilerArguments {
@Argument(value = "opt", description = "Enable optimizations during compilation")
public boolean optimization;
@Argument(value = "target", description = "Set hardware target")
@ValueDescription("<target>")
public String target;
@Argument(value = "list_targets", description = "List available hardware targets")
public boolean listTargets;
@Argument(value = "print_ir", description = "Print IR")
public boolean printIr;