gradle-plugin: Add prefix -copt or -lopt for each option in a list

This commit is contained in:
Ilya Matveev
2017-03-31 19:55:49 +07:00
parent 9c6a0d9853
commit 951598cca9
@@ -81,13 +81,17 @@ open class KonanInteropTask: DefaultTask() {
addFileArgs("-h", headers)
addListArg("-copt", compilerOpts)
compilerOpts.forEach {
addArg("-copt", it)
}
val linkerOpts = mutableListOf<String>().apply { addAll(linkerOpts) }
linkFiles.forEach {
linkerOpts.addAll(it.files.map { it.canonicalPath })
}
addListArg("-lopt", linkerOpts)
linkerOpts.forEach {
addArg("-lopt", it)
}
}
}