LINK: makes macosx based target awared about dsymuil on link stage
- added verbosing symbol information (perhaps it's require special flag).
This commit is contained in:
committed by
vvlevchenko
parent
7e9a01b6ba
commit
05c25e4e0a
+14
@@ -55,6 +55,7 @@ internal open class MacOSPlatform(distribution: Distribution)
|
||||
properties.propertyList("linkerOptimizationFlags.osx")
|
||||
override val linkerKonanFlags = properties.propertyList("linkerKonanFlags.osx")
|
||||
override val linker = "${distribution.sysRoot}/usr/bin/ld"
|
||||
private val dsymutil = "${distribution.llvmBin}/llvm-dsymutil"
|
||||
|
||||
open val arch = properties.propertyString("arch.osx")!!
|
||||
open val osVersionMin = properties.propertyList("osVersionMin.osx")
|
||||
@@ -75,6 +76,14 @@ internal open class MacOSPlatform(distribution: Distribution)
|
||||
linkerKonanFlags +
|
||||
listOf("-lSystem")
|
||||
}
|
||||
|
||||
open fun dsymutilCommand(executable: ExecutableFile): List<String> {
|
||||
return listOf(dsymutil, executable)
|
||||
}
|
||||
|
||||
open fun dsymutilDryRunVerboseCommand(executable: ExecutableFile): List<String> {
|
||||
return listOf(dsymutil, "-dump-debug-map" ,executable)
|
||||
}
|
||||
}
|
||||
|
||||
internal class IPhoneOSfromMacOSPlatform(distribution: Distribution)
|
||||
@@ -259,6 +268,11 @@ internal class LinkStage(val context: Context) {
|
||||
entryPointSelector
|
||||
|
||||
runTool(*linkCommand.toTypedArray())
|
||||
if (platform is MacOSPlatform && context.shouldContainDebugInfo()) {
|
||||
if (context.phase?.verbose ?: false)
|
||||
runTool(*platform.dsymutilDryRunVerboseCommand(executable).toTypedArray())
|
||||
runTool(*platform.dsymutilCommand(executable).toTypedArray())
|
||||
}
|
||||
|
||||
return executable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user