[K/N] Support -Xsave-llvm-ir-after compiler option

This commit is contained in:
Pavel Kunyavskiy
2021-12-20 14:07:12 +03:00
committed by Space
parent 0689d74353
commit c97f4a4d20
7 changed files with 49 additions and 20 deletions
@@ -182,7 +182,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
arguments.manifestFile ?.let{ put(MANIFEST_FILE, it) }
arguments.runtimeFile ?.let{ put(RUNTIME_FILE, it) }
arguments.temporaryFilesDir?.let { put(TEMPORARY_FILES_DIR, it) }
put(SAVE_LLVM_IR, arguments.saveLlvmIr)
put(SAVE_LLVM_IR, arguments.saveLlvmIrAfter.toList())
put(LIST_TARGETS, arguments.listTargets)
put(OPTIMIZATION, arguments.optimization)
@@ -255,8 +255,8 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-Xtemporary-files-dir", deprecatedName = "--temporary_files_dir", valueDescription = "<path>", description = "Save temporary files to the given directory")
var temporaryFilesDir: String? = null
@Argument(value = "-Xsave-llvm-ir", description = "Save result of Kotlin IR to LLVM IR translation to the temporary files directory.")
var saveLlvmIr: Boolean = false
@Argument(value = "-Xsave-llvm-ir-after", description = "Save result of Kotlin IR to LLVM IR translation to the temporary files directory.")
var saveLlvmIrAfter: Array<String> = emptyArray()
@Argument(value = "-Xverify-bitcode", deprecatedName = "--verify_bitcode", description = "Verify llvm bitcode after each method")
var verifyBitCode: Boolean = false