Fix link conflicts between multiple non-debug static frameworks (#3662)
Avoid exporting symbols that aren't required externally.
This commit is contained in:
committed by
GitHub
parent
376d9eee20
commit
e1bb426e55
@@ -183,7 +183,7 @@ void Kotlin_resumeRuntime(RuntimeState* state) {
|
|||||||
WorkerResume(state->worker);
|
WorkerResume(state->worker);
|
||||||
}
|
}
|
||||||
|
|
||||||
RuntimeState* RUNTIME_USED Kotlin_getRuntime() {
|
RuntimeState* Kotlin_getRuntime() {
|
||||||
RuntimeCheck(isValidRuntime(), "Runtime must be active on the current thread");
|
RuntimeCheck(isValidRuntime(), "Runtime must be active on the current thread");
|
||||||
return ::runtimeState;
|
return ::runtimeState;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,24 +26,24 @@ struct InitNode;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void RUNTIME_USED Kotlin_initRuntimeIfNeeded();
|
void Kotlin_initRuntimeIfNeeded();
|
||||||
void RUNTIME_USED Kotlin_deinitRuntimeIfNeeded();
|
void Kotlin_deinitRuntimeIfNeeded();
|
||||||
|
|
||||||
// Operations below allow flexible runtime scheduling on different threads.
|
// Operations below allow flexible runtime scheduling on different threads.
|
||||||
// Created runtime is in SUSPENDED state, and need to be resumed for actual execution.
|
// Created runtime is in SUSPENDED state, and need to be resumed for actual execution.
|
||||||
RuntimeState* RUNTIME_USED Kotlin_createRuntime();
|
RuntimeState* Kotlin_createRuntime();
|
||||||
// Runtime must be in SUSPENDED state, before it could be destroyed.
|
// Runtime must be in SUSPENDED state, before it could be destroyed.
|
||||||
void RUNTIME_USED Kotlin_destroyRuntime(RuntimeState*);
|
void Kotlin_destroyRuntime(RuntimeState*);
|
||||||
|
|
||||||
// Transition current runtime from RUNNING to SUSPENDED state, and clearing thread local variable caching
|
// Transition current runtime from RUNNING to SUSPENDED state, and clearing thread local variable caching
|
||||||
// the runtime. After suspension, runtime could be rescheduled to a different thread.
|
// the runtime. After suspension, runtime could be rescheduled to a different thread.
|
||||||
RuntimeState* RUNTIME_USED Kotlin_suspendRuntime();
|
RuntimeState* Kotlin_suspendRuntime();
|
||||||
// Transition runtime from SUSPENDED to RUNNING state, and sets thread local variable caching
|
// Transition runtime from SUSPENDED to RUNNING state, and sets thread local variable caching
|
||||||
// the runtime. After resume, current thread could be used for executing Kotlin code.
|
// the runtime. After resume, current thread could be used for executing Kotlin code.
|
||||||
void RUNTIME_USED Kotlin_resumeRuntime(RuntimeState*);
|
void Kotlin_resumeRuntime(RuntimeState*);
|
||||||
|
|
||||||
// Gets currently active runtime, fails if no runtime is currently available.
|
// Gets currently active runtime, fails if no runtime is currently available.
|
||||||
RuntimeState* RUNTIME_USED Kotlin_getRuntime();
|
RuntimeState* Kotlin_getRuntime();
|
||||||
|
|
||||||
bool Kotlin_hasRuntime();
|
bool Kotlin_hasRuntime();
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "Porting.h"
|
#include "Porting.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|
||||||
|
#if KONAN_LINUX || KONAN_WINDOWS
|
||||||
// This function replaces `__cxa_demangle` defined in GNU libstdc++
|
// This function replaces `__cxa_demangle` defined in GNU libstdc++
|
||||||
// by adding `--defsym` flag in `konan.properties`.
|
// by adding `--defsym` flag in `konan.properties`.
|
||||||
// This allows to avoid linking `__cxa_demangle` and its dependencies, thus reducing binary size.
|
// This allows to avoid linking `__cxa_demangle` and its dependencies, thus reducing binary size.
|
||||||
@@ -34,3 +35,5 @@ namespace std {
|
|||||||
RuntimeAssert(false, __s);
|
RuntimeAssert(false, __s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // KONAN_LINUX || KONAN_WINDOWS
|
||||||
|
|||||||
Reference in New Issue
Block a user