Only allow library prunning for the default links for now.
Don't forget to bring it back when library dependency info is available.
This commit is contained in:
committed by
alexander-gorshenev
parent
97936093dc
commit
fc31e96b26
+1
-6
@@ -233,12 +233,7 @@ internal class LinkStage(val context: Context) {
|
|||||||
private val emitted = context.bitcodeFileName
|
private val emitted = context.bitcodeFileName
|
||||||
private val libraries = context.config.libraries
|
private val libraries = context.config.libraries
|
||||||
.map {
|
.map {
|
||||||
if (!it.isNeededForLink) {
|
if (!it.isNeededForLink && it.isDefaultLink) null else it
|
||||||
if (!it.isDefaultLink) {
|
|
||||||
context.reportCompilationWarning("The '${it.libraryName}' library has not been referenced. Omitted from the final link.")
|
|
||||||
}
|
|
||||||
null
|
|
||||||
} else it
|
|
||||||
}.filterNotNull()
|
}.filterNotNull()
|
||||||
|
|
||||||
private fun MutableList<String>.addNonEmpty(elements: List<String>) {
|
private fun MutableList<String>.addNonEmpty(elements: List<String>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user