From 951598cca9a352a6685c93798e818e9d651420e2 Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Fri, 31 Mar 2017 19:55:49 +0700 Subject: [PATCH] gradle-plugin: Add prefix -copt or -lopt for each option in a list --- tools/gradle-plugin/src/main/kotlin/KonanInteropTask.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/gradle-plugin/src/main/kotlin/KonanInteropTask.kt b/tools/gradle-plugin/src/main/kotlin/KonanInteropTask.kt index b76e8f2bb5e..c78058b0ba0 100644 --- a/tools/gradle-plugin/src/main/kotlin/KonanInteropTask.kt +++ b/tools/gradle-plugin/src/main/kotlin/KonanInteropTask.kt @@ -81,13 +81,17 @@ open class KonanInteropTask: DefaultTask() { addFileArgs("-h", headers) - addListArg("-copt", compilerOpts) + compilerOpts.forEach { + addArg("-copt", it) + } val linkerOpts = mutableListOf().apply { addAll(linkerOpts) } linkFiles.forEach { linkerOpts.addAll(it.files.map { it.canonicalPath }) } - addListArg("-lopt", linkerOpts) + linkerOpts.forEach { + addArg("-lopt", it) + } } }