build/gradle/cli compiler flags usage fix (#2045)
This commit is contained in:
committed by
Nikolay Igotti
parent
20d3520717
commit
66732675e5
@@ -170,7 +170,7 @@ targetList.each { target ->
|
||||
if (target != "wasm32") defaultArgs += '-g'
|
||||
def konanArgs = [*defaultArgs,
|
||||
'-target', target,
|
||||
'-Xruntime', project(':runtime').file("build/${target}/runtime.bc"),
|
||||
"-Xruntime=${project(':runtime').file('build/' + target +'/runtime.bc')}",
|
||||
*project.globalBuildArgs]
|
||||
|
||||
task("${target}Stdlib", type: JavaExec) {
|
||||
|
||||
@@ -64,7 +64,7 @@ project.rootProject.ext.platformManager.enabled.each { target ->
|
||||
libraries {
|
||||
klibs df.config.depends
|
||||
}
|
||||
extraOpts '--purge_user_libs'
|
||||
extraOpts '-Xpurge-user-libs'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ open class KotlinNativeCompile @Inject constructor(internal val binary: Abstract
|
||||
addArg("-l", library.nameWithoutExtension)
|
||||
}
|
||||
|
||||
addListArg("-linkerOpts", linkerOpts)
|
||||
addListArg("-linker-options", linkerOpts)
|
||||
|
||||
addAll(sources.files.map { it.absolutePath })
|
||||
}
|
||||
|
||||
+2
-2
@@ -117,7 +117,7 @@ abstract class KonanCompileTask: KonanBuildingTask(), KonanCompileSpec {
|
||||
// The library's directory is added in libraries.repos.
|
||||
addArgs("-library", libraries.artifacts.map { it.artifact.nameWithoutExtension })
|
||||
|
||||
addFileArgs("-nativelibrary", nativeLibraries)
|
||||
addFileArgs("-native-library", nativeLibraries)
|
||||
addArg("-produce", produce.name.toLowerCase())
|
||||
|
||||
addListArg("-linkerOpts", linkerOpts)
|
||||
@@ -132,7 +132,7 @@ abstract class KonanCompileTask: KonanBuildingTask(), KonanCompileSpec {
|
||||
addKey("-nomain", noMain)
|
||||
addKey("-opt", enableOptimizations)
|
||||
addKey("-ea", enableAssertions)
|
||||
addKey("--time", measureTime)
|
||||
addKey("-Xtime", measureTime)
|
||||
addKey("-nodefaultlibs", noDefaultLibs)
|
||||
addKey("-Xmulti-platform", enableMultiplatform)
|
||||
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ open class KonanCompilerDownloadTask : DefaultTask() {
|
||||
if (downloadDependencies) {
|
||||
val runner = KonanCompilerRunner(project, project.konanExtension.jvmArgs)
|
||||
project.konanTargets.forEach {
|
||||
runner.run("--check_dependencies", "-target", it.visibleName)
|
||||
runner.run("-Xcheck_dependencies", "-target", it.visibleName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.native.interop.gen.jvm.interop
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
|
||||
private const val NODEFAULTLIBS = "-nodefaultlibs"
|
||||
private const val PURGE_USER_LIBS = "--purge_user_libs"
|
||||
private const val PURGE_USER_LIBS = "-Xpurge-user-libs"
|
||||
|
||||
// TODO: this function should eventually be eliminated from 'utilities'.
|
||||
// The interaction of interop and the compler should be streamlined.
|
||||
@@ -45,7 +45,7 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String> {
|
||||
noDefaultLibs = true
|
||||
if (arg == PURGE_USER_LIBS)
|
||||
purgeUserLibs = true
|
||||
if (arg == "--temporary_files_dir")
|
||||
if (arg == "-Xtemporary-files-dir")
|
||||
temporaryFilesDir = nextArg ?: ""
|
||||
}
|
||||
|
||||
@@ -86,9 +86,9 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String> {
|
||||
|
||||
val nativeStubs =
|
||||
if (flavor == "wasm")
|
||||
arrayOf("-includeBinary", File(nativesDir, "js_stubs.js").path)
|
||||
arrayOf("-include-binary", File(nativesDir, "js_stubs.js").path)
|
||||
else
|
||||
arrayOf("-nativelibrary",File(nativesDir, "$cstubsName.bc").path)
|
||||
arrayOf("-native-library",File(nativesDir, "$cstubsName.bc").path)
|
||||
|
||||
val konancArgs = arrayOf(
|
||||
generatedDir.path,
|
||||
@@ -96,7 +96,7 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String> {
|
||||
"-o", outputFileName,
|
||||
"-target", target.visibleName,
|
||||
"-manifest", manifest.path,
|
||||
"--temporary_files_dir", temporaryFilesDir) +
|
||||
"-Xtemporary-files-dir=$temporaryFilesDir") +
|
||||
nativeStubs +
|
||||
cinteropArgsToCompiler +
|
||||
libraries.flatMap { listOf("-library", it) } +
|
||||
|
||||
Reference in New Issue
Block a user