@@ -928,7 +928,7 @@ linkerDynamicFlags.mingw_x86 = -shared
|
|||||||
linkerKonanFlags.mingw_x86 = -static-libgcc -static-libstdc++ \
|
linkerKonanFlags.mingw_x86 = -static-libgcc -static-libstdc++ \
|
||||||
-Wl,--dynamicbase \
|
-Wl,--dynamicbase \
|
||||||
-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic \
|
-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive,-Bdynamic \
|
||||||
-Wl,--defsym,__cxa_demangle=Konan_cxa_demangle
|
-Wl,--defsym,__cxa_demangle=_Konan_cxa_demangle
|
||||||
mimallocLinkerDependencies.mingw_x86 = -lbcrypt
|
mimallocLinkerDependencies.mingw_x86 = -lbcrypt
|
||||||
linkerOptimizationFlags.mingw_x86 = -Wl,--gc-sections
|
linkerOptimizationFlags.mingw_x86 = -Wl,--gc-sections
|
||||||
runtimeDefinitions.mingw_x86 = USE_GCC_UNWIND=1 USE_PE_COFF_SYMBOLS=1 KONAN_WINDOWS=1 \
|
runtimeDefinitions.mingw_x86 = USE_GCC_UNWIND=1 USE_PE_COFF_SYMBOLS=1 KONAN_WINDOWS=1 \
|
||||||
|
|||||||
@@ -480,11 +480,16 @@ class MingwLinker(targetProperties: MingwConfigurables)
|
|||||||
if (HostManager.hostIsMingw) {
|
if (HostManager.hostIsMingw) {
|
||||||
lldCompatibilityChecker?.let { checkLldCompatibiity ->
|
lldCompatibilityChecker?.let { checkLldCompatibiity ->
|
||||||
// -### flag allows to avoid actual linkage process.
|
// -### flag allows to avoid actual linkage process.
|
||||||
|
val konanCxaDemangleSymbol = when (target) {
|
||||||
|
KonanTarget.MINGW_X64 -> "Konan_cxa_demangle"
|
||||||
|
KonanTarget.MINGW_X86 -> "_Konan_cxa_demangle"
|
||||||
|
else -> error("Unexpected target: $target")
|
||||||
|
}
|
||||||
val lldCommand = Command(linker).constructLinkerArguments(
|
val lldCommand = Command(linker).constructLinkerArguments(
|
||||||
// Add -fuse-ld to the end of the list to override previous appearances.
|
// Add -fuse-ld to the end of the list to override previous appearances.
|
||||||
additionalArguments = listOf("-fuse-ld=$absoluteLldLocation", "-Wl,-###"),
|
additionalArguments = listOf("-fuse-ld=$absoluteLldLocation", "-Wl,-###"),
|
||||||
// LLD doesn't support defsym.
|
// LLD doesn't support defsym.
|
||||||
skipDefaultArguments = listOf("-Wl,--defsym,__cxa_demangle=Konan_cxa_demangle")
|
skipDefaultArguments = listOf("-Wl,--defsym,__cxa_demangle=$konanCxaDemangleSymbol")
|
||||||
)
|
)
|
||||||
checkLldCompatibiity(lldCommand)
|
checkLldCompatibiity(lldCommand)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user