Add AnalysisHandlerExtension extension point for K2Native

frontendPhase is moved out of back phases to allow frontend only mode.

AnalysisHandlerExtension allows compiler plugins to:
1. Intercept and override the default analysis.
2. Utilize the compiler infrastructure to do custom analysis.

A well know plugin on the JVM platform is KAPT.
This commit is contained in:
Ting-Yuan Huang
2021-03-19 02:07:37 -07:00
committed by TeamCityServer
parent 8e7b561b10
commit dba127a4d8
7 changed files with 67 additions and 28 deletions
@@ -180,6 +180,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
put(PRINT_DESCRIPTORS, arguments.printDescriptors)
put(PRINT_LOCATIONS, arguments.printLocations)
put(PRINT_BITCODE, arguments.printBitCode)
put(PRINT_FILES, arguments.printFiles)
put(PURGE_USER_LIBS, arguments.purgeUserLibs)
@@ -199,6 +199,9 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-Xprint-locations", deprecatedName = "--print_locations", description = "Print locations")
var printLocations: Boolean = false
@Argument(value = "-Xprint-files", description = "Print files")
var printFiles: Boolean = false
@Argument(value="-Xpurge-user-libs", deprecatedName = "--purge_user_libs", description = "Don't link unused libraries even explicitly specified")
var purgeUserLibs: Boolean = false