[K/N] Add opt-in flag to use debug info from native libs
Unfortunately, llvm removes full debug info from module on any error. Different version debug info in bitcode is not always compatible, also it adds this debug info additional requirements on generated debug info. So this feature is quite unstable and shouldn't be enabled by default, although it has almost no downsides when worked correctly.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#define RUNTIME_PURE __attribute__((pure))
|
||||
#define RUNTIME_USED __attribute__((used))
|
||||
#define RUNTIME_WEAK __attribute__((weak))
|
||||
#define RUNTIME_NODEBUG __attribute__((nodebug))
|
||||
|
||||
#define ALWAYS_INLINE __attribute__((always_inline))
|
||||
#define NO_INLINE __attribute__((noinline))
|
||||
|
||||
@@ -320,7 +320,7 @@ constexpr int CALLED_LLVM_BUILTIN = -2;
|
||||
* should not be accessed. So before guard checking we need to check is thread destructor is running,
|
||||
* which requires special handling of recursive calls from this check.
|
||||
*/
|
||||
extern "C" RUNTIME_NOTHROW void Kotlin_mm_checkStateAtExternalFunctionCall(const char* caller, const char *callee, const void *calleePtr) noexcept {
|
||||
extern "C" RUNTIME_NOTHROW RUNTIME_NODEBUG void Kotlin_mm_checkStateAtExternalFunctionCall(const char* caller, const char *callee, const void *calleePtr) noexcept {
|
||||
if (reinterpret_cast<int64_t>(calleePtr) == MSG_SEND_TO_NULL) return; // objc_sendMsg called on nil, it does nothing, so it's ok
|
||||
if (konan::isOnThreadExitNotSetOrAlreadyStarted()) return;
|
||||
static thread_local bool recursiveCallGuard = false;
|
||||
|
||||
Reference in New Issue
Block a user