Don't use exitProcess to indicate a failure in Native library resolver
If Native compiler performs exitProcess, it crashes Gradle daemon that runs the compiler.
This commit is contained in:
committed by
Space
parent
f1cdd0e2ed
commit
df77cd303f
@@ -61,7 +61,6 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
|
||||
val project = environment.project
|
||||
val messageCollector = configuration.get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY) ?: MessageCollector.NONE
|
||||
configuration.put(CLIConfigurationKeys.PHASE_CONFIG, createPhaseConfig(toplevelPhase, arguments, messageCollector))
|
||||
val konanConfig = KonanConfig(project, configuration)
|
||||
|
||||
val enoughArguments = arguments.freeArgs.isNotEmpty() || arguments.isUsefulWithoutFreeArgs
|
||||
if (!enoughArguments) {
|
||||
@@ -75,6 +74,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
|
||||
}
|
||||
|
||||
try {
|
||||
val konanConfig = KonanConfig(project, configuration)
|
||||
runTopLevelPhases(konanConfig, environment)
|
||||
} catch (e: KonanCompilationException) {
|
||||
return ExitCode.COMPILATION_ERROR
|
||||
|
||||
Reference in New Issue
Block a user