[build][native support] intoduced new native support.
This commit is contained in:
@@ -226,10 +226,16 @@ class ClangArgs(private val configurables: Configurables) : Configurables by con
|
||||
private val targetClangXXCmd
|
||||
= listOf("${absoluteLlvmHome}/bin/clang++") + clangArgs
|
||||
|
||||
private val targetArCmd
|
||||
= listOf("${absoluteLlvmHome}/bin/llvm-ar")
|
||||
|
||||
|
||||
fun clangC(vararg userArgs: String) = targetClangCmd + userArgs.asList()
|
||||
|
||||
fun clangCXX(vararg userArgs: String) = targetClangXXCmd + userArgs.asList()
|
||||
|
||||
fun llvmAr(vararg userArgs: String) = targetArCmd + userArgs.asList()
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun filterGradleNativeSoftwareFlags(args: MutableList<String>) {
|
||||
|
||||
+3
-1
@@ -80,7 +80,9 @@ abstract class KonanPropertiesLoader(override val target: KonanTarget,
|
||||
dependenciesRoot = File(baseDir),
|
||||
properties = this,
|
||||
archiveType = defaultArchiveTypeByHost(host)
|
||||
)
|
||||
){ url, currentBytes, totalBytes ->
|
||||
print("\n(KonanProperies) Downloading dependency: $url (${currentBytes}/${totalBytes}). ")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -32,9 +32,9 @@ class DependencyDownloader(
|
||||
customProgressCallback: ProgressCallback? = null
|
||||
) {
|
||||
|
||||
private val progressCallback = customProgressCallback ?: { url, currentBytes, totalBytes ->
|
||||
private val progressCallback = customProgressCallback ?: TODO()/* { url, currentBytes, totalBytes ->
|
||||
print("\nDownloading dependency: $url (${currentBytes.humanReadable}/${totalBytes.humanReadable}). ")
|
||||
}
|
||||
}*/
|
||||
|
||||
val executor = ExecutorCompletionService<Unit>(Executors.newSingleThreadExecutor(object : ThreadFactory {
|
||||
override fun newThread(r: Runnable?): Thread {
|
||||
|
||||
+8
-4
@@ -111,20 +111,23 @@ class DependencyProcessor(dependenciesRoot: File,
|
||||
properties: KonanPropertiesLoader,
|
||||
dependenciesUrl: String = properties.dependenciesUrl,
|
||||
keepUnstable:Boolean = true,
|
||||
archiveType: ArchiveType = ArchiveType.systemDefault) : this(
|
||||
archiveType: ArchiveType = ArchiveType.systemDefault,
|
||||
customProgressCallback: ProgressCallback? = null) : this(
|
||||
dependenciesRoot,
|
||||
properties.properties,
|
||||
properties.dependencies,
|
||||
dependenciesUrl,
|
||||
keepUnstable = keepUnstable,
|
||||
archiveType = archiveType)
|
||||
archiveType = archiveType,
|
||||
customProgressCallback = customProgressCallback)
|
||||
|
||||
constructor(dependenciesRoot: File,
|
||||
properties: Properties,
|
||||
dependencies: List<String>,
|
||||
dependenciesUrl: String = properties.dependenciesUrl,
|
||||
keepUnstable:Boolean = true,
|
||||
archiveType: ArchiveType = ArchiveType.systemDefault) : this(
|
||||
archiveType: ArchiveType = ArchiveType.systemDefault,
|
||||
customProgressCallback: ProgressCallback? = null ) : this(
|
||||
dependenciesRoot,
|
||||
dependenciesUrl,
|
||||
dependencyToCandidates = properties.findCandidates(dependencies),
|
||||
@@ -132,7 +135,8 @@ class DependencyProcessor(dependenciesRoot: File,
|
||||
maxAttempts = properties.downloadingAttempts,
|
||||
attemptIntervalMs = properties.downloadingAttemptIntervalMs,
|
||||
keepUnstable = keepUnstable,
|
||||
archiveType = archiveType)
|
||||
archiveType = archiveType,
|
||||
customProgressCallback = customProgressCallback)
|
||||
|
||||
|
||||
class DependencyFile(directory: File, fileName: String) {
|
||||
|
||||
Reference in New Issue
Block a user