Add -keep command line option to JS DCE tool
This commit is contained in:
@@ -49,7 +49,9 @@ class K2JSDce : CLITool<K2JSDceArguments>() {
|
||||
return ExitCode.COMPILATION_ERROR
|
||||
}
|
||||
|
||||
val dceResult = DeadCodeElimination.run(files, emptySet()) {
|
||||
val includedDeclarations = arguments.declarationsToKeep.orEmpty().toSet()
|
||||
|
||||
val dceResult = DeadCodeElimination.run(files, includedDeclarations) {
|
||||
messageCollector.report(CompilerMessageSeverity.LOGGING, it)
|
||||
}
|
||||
val nodes = dceResult.reachableNodes
|
||||
|
||||
Reference in New Issue
Block a user