[K/N] Use gradle-level conditional compilation for core symbolication
This commit is contained in:
@@ -126,8 +126,7 @@ linkerDynamicFlags.macos_x64 = -dylib
|
||||
|
||||
osVersionMinFlagLd.macos_x64 = -macosx_version_min
|
||||
osVersionMin.macos_x64 = 10.13
|
||||
runtimeDefinitions.macos_x64 = KONAN_OSX=1 KONAN_MACOSX=1 KONAN_X64=1 KONAN_OBJC_INTEROP=1 \
|
||||
KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.macos_x64 = KONAN_OSX=1 KONAN_MACOSX=1 KONAN_X64=1 KONAN_OBJC_INTEROP=1
|
||||
dependencies.macos_x64 = \
|
||||
lldb-4-macos
|
||||
|
||||
@@ -166,8 +165,7 @@ linkerDynamicFlags.macos_arm64 = -dylib
|
||||
|
||||
osVersionMinFlagLd.macos_arm64 = -macosx_version_min
|
||||
osVersionMin.macos_arm64 = 11.0
|
||||
runtimeDefinitions.macos_arm64 = KONAN_OSX=1 KONAN_MACOSX=1 KONAN_ARM64=1 KONAN_OBJC_INTEROP=1 \
|
||||
KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.macos_arm64 = KONAN_OSX=1 KONAN_MACOSX=1 KONAN_ARM64=1 KONAN_OBJC_INTEROP=1
|
||||
dependencies.macos_arm64 = \
|
||||
lldb-4-macos
|
||||
|
||||
@@ -263,8 +261,7 @@ stripFlags.ios_x64 = -S
|
||||
linkerDynamicFlags.ios_x64 = -dylib
|
||||
osVersionMinFlagLd.ios_x64 = -ios_simulator_version_min
|
||||
osVersionMin.ios_x64 = 9.0
|
||||
runtimeDefinitions.ios_x64 = KONAN_OBJC_INTEROP=1 KONAN_IOS=1 KONAN_X64=1 \
|
||||
KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.ios_x64 = KONAN_OBJC_INTEROP=1 KONAN_IOS=1 KONAN_X64=1
|
||||
|
||||
# iOS simulator on Apple Silicon
|
||||
|
||||
@@ -289,8 +286,7 @@ stripFlags.ios_simulator_arm64 = -S
|
||||
linkerDynamicFlags.ios_simulator_arm64 = -dylib
|
||||
osVersionMinFlagLd.ios_simulator_arm64 = -ios_simulator_version_min
|
||||
osVersionMin.ios_simulator_arm64 = 9.0
|
||||
runtimeDefinitions.ios_simulator_arm64 = KONAN_OBJC_INTEROP=1 KONAN_IOS=1 KONAN_ARM64=1 \
|
||||
KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.ios_simulator_arm64 = KONAN_OBJC_INTEROP=1 KONAN_IOS=1 KONAN_ARM64=1
|
||||
|
||||
# Apple's tvOS simulator.
|
||||
targetToolchain.macos_x64-tvos_x64 = target-toolchain-xcode_12_5
|
||||
@@ -314,8 +310,7 @@ stripFlags.tvos_x64 = -S
|
||||
linkerDynamicFlags.tvos_x64 = -dylib
|
||||
osVersionMinFlagLd.tvos_x64 = -tvos_simulator_version_min
|
||||
osVersionMin.tvos_x64 = 9.0
|
||||
runtimeDefinitions.tvos_x64 = KONAN_OBJC_INTEROP=1 KONAN_TVOS=1 KONAN_X64=1 \
|
||||
KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.tvos_x64 = KONAN_OBJC_INTEROP=1 KONAN_TVOS=1 KONAN_X64=1
|
||||
|
||||
# Apple's tvOS simulator.
|
||||
targetToolchain.macos_x64-tvos_simulator_arm64 = target-toolchain-xcode_12_5
|
||||
@@ -339,8 +334,7 @@ stripFlags.tvos_simulator_arm64 = -S
|
||||
linkerDynamicFlags.tvos_simulator_arm64 = -dylib
|
||||
osVersionMinFlagLd.tvos_simulator_arm64 = -tvos_simulator_version_min
|
||||
osVersionMin.tvos_simulator_arm64 = 9.0
|
||||
runtimeDefinitions.tvos_simulator_arm64 = KONAN_OBJC_INTEROP=1 KONAN_TVOS=1 KONAN_ARM64=1 \
|
||||
KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.tvos_simulator_arm64 = KONAN_OBJC_INTEROP=1 KONAN_TVOS=1 KONAN_ARM64=1
|
||||
|
||||
# Apple's 64-bit tvOS.
|
||||
targetToolchain.macos_x64-tvos_arm64 = target-toolchain-xcode_12_5
|
||||
@@ -443,8 +437,7 @@ stripFlags.watchos_x86 = -S
|
||||
linkerDynamicFlags.watchos_x86 = -dylib
|
||||
osVersionMinFlagLd.watchos_x86 = -watchos_simulator_version_min
|
||||
osVersionMin.watchos_x86 = 5.0
|
||||
runtimeDefinitions.watchos_x86 = KONAN_OBJC_INTEROP=1 KONAN_WATCHOS=1 KONAN_NO_64BIT_ATOMIC=1 \
|
||||
KONAN_X86=1 KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.watchos_x86 = KONAN_OBJC_INTEROP=1 KONAN_WATCHOS=1 KONAN_NO_64BIT_ATOMIC=1 KONAN_X86=1
|
||||
|
||||
# watchOS x86_64 simulator.
|
||||
targetToolchain.macos_x64-watchos_x64 = target-toolchain-xcode_12_5
|
||||
@@ -468,8 +461,7 @@ stripFlags.watchos_x64 = -S
|
||||
linkerDynamicFlags.watchos_x64 = -dylib
|
||||
osVersionMinFlagLd.watchos_x64 = -watchos_simulator_version_min
|
||||
osVersionMin.watchos_x64 = 7.0
|
||||
runtimeDefinitions.watchos_x64 = KONAN_OBJC_INTEROP=1 KONAN_WATCHOS=1 \
|
||||
KONAN_X64=1 KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.watchos_x64 = KONAN_OBJC_INTEROP=1 KONAN_WATCHOS=1 KONAN_X64=1
|
||||
|
||||
# watchOS Apple Silicon simulator.
|
||||
targetToolchain.macos_x64-watchos_simulator_arm64 = target-toolchain-xcode_12_5
|
||||
@@ -493,8 +485,7 @@ stripFlags.watchos_simulator_arm64 = -S
|
||||
linkerDynamicFlags.watchos_simulator_arm64 = -dylib
|
||||
osVersionMinFlagLd.watchos_simulator_arm64 = -watchos_simulator_version_min
|
||||
osVersionMin.watchos_simulator_arm64 = 7.0
|
||||
runtimeDefinitions.watchos_simulator_arm64 = KONAN_OBJC_INTEROP=1 KONAN_WATCHOS=1 \
|
||||
KONAN_ARM64=1 KONAN_CORE_SYMBOLICATION=1
|
||||
runtimeDefinitions.watchos_simulator_arm64 = KONAN_OBJC_INTEROP=1 KONAN_WATCHOS=1 KONAN_ARM64=1
|
||||
|
||||
|
||||
# Linux x86-64.
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "SourceInfo.h"
|
||||
|
||||
#ifdef KONAN_CORE_SYMBOLICATION
|
||||
#include <KAssert.h>
|
||||
#include <cstdint>
|
||||
#include <dlfcn.h>
|
||||
@@ -196,5 +195,4 @@ extern "C" int Kotlin_getSourceInfo_core_symbolication(void* addr, SourceInfo *r
|
||||
SYM_LOG("}\n");
|
||||
result_buffer[0] = result;
|
||||
return 1;
|
||||
}
|
||||
#endif // KONAN_CORE_SYMBOLICATION
|
||||
}
|
||||
+5
-1
@@ -32,7 +32,11 @@ fun KonanTarget.supportsLibBacktrace(): Boolean =
|
||||
this.family.isAppleFamily || this.family == Family.LINUX || this.family == Family.ANDROID
|
||||
|
||||
fun KonanTarget.supportsCoreSymbolication(): Boolean =
|
||||
this.family.isAppleFamily
|
||||
this in listOf(
|
||||
KonanTarget.MACOS_X64, KonanTarget.MACOS_ARM64, KonanTarget.IOS_X64,
|
||||
KonanTarget.IOS_SIMULATOR_ARM64, KonanTarget.TVOS_X64, KonanTarget.TVOS_SIMULATOR_ARM64,
|
||||
KonanTarget.WATCHOS_X86, KonanTarget.WATCHOS_X64, KonanTarget.WATCHOS_SIMULATOR_ARM64
|
||||
)
|
||||
|
||||
|
||||
fun KonanTarget.supportsThreads(): Boolean =
|
||||
|
||||
Reference in New Issue
Block a user