Fix install_name for dynamic cache (#4510)
This commit is contained in:
committed by
Stanislav Erokhin
parent
598d0e07e3
commit
2c898fe72c
+1
-1
@@ -114,7 +114,7 @@ internal class Linker(val context: Context) {
|
|||||||
additionalLinkerArgs = if (target.family.isAppleFamily) {
|
additionalLinkerArgs = if (target.family.isAppleFamily) {
|
||||||
when (context.config.produce) {
|
when (context.config.produce) {
|
||||||
CompilerOutputKind.DYNAMIC_CACHE ->
|
CompilerOutputKind.DYNAMIC_CACHE ->
|
||||||
listOf("-install_name", context.config.outputFiles.mainFile)
|
listOf("-install_name", context.config.outputFiles.dynamicCacheInstallName)
|
||||||
else -> listOf("-dead_strip")
|
else -> listOf("-dead_strip")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+5
-1
@@ -39,6 +39,10 @@ class OutputFiles(outputPath: String?, target: KonanTarget, val produce: Compile
|
|||||||
else
|
else
|
||||||
outputName.fullOutputName()
|
outputName.fullOutputName()
|
||||||
|
|
||||||
|
private val cacheFile = File(outputName.fullOutputName()).absoluteFile.name
|
||||||
|
|
||||||
|
val dynamicCacheInstallName = File(outputName).child(cacheFile).absolutePath
|
||||||
|
|
||||||
val tempCacheDirectory =
|
val tempCacheDirectory =
|
||||||
if (produce.isCache)
|
if (produce.isCache)
|
||||||
File(outputName + Random.nextLong().toString())
|
File(outputName + Random.nextLong().toString())
|
||||||
@@ -46,7 +50,7 @@ class OutputFiles(outputPath: String?, target: KonanTarget, val produce: Compile
|
|||||||
|
|
||||||
val nativeBinaryFile =
|
val nativeBinaryFile =
|
||||||
if (produce.isCache)
|
if (produce.isCache)
|
||||||
tempCacheDirectory!!.child(File(outputName.fullOutputName()).absoluteFile.name).absolutePath
|
tempCacheDirectory!!.child(cacheFile).absolutePath
|
||||||
else mainFile
|
else mainFile
|
||||||
|
|
||||||
val symbolicInfoFile = "$nativeBinaryFile.dSYM"
|
val symbolicInfoFile = "$nativeBinaryFile.dSYM"
|
||||||
|
|||||||
Reference in New Issue
Block a user