mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix log assertions ggml
This commit is contained in:
parent
1331b1c6d6
commit
bec40d167c
@ -85,13 +85,13 @@ include $(CLEAR_VARS)
|
|||||||
# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
|
# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
|
||||||
LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_common_static
|
LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_common_static
|
||||||
|
|
||||||
|
LOCAL_LDFLAGS += -llog
|
||||||
|
|
||||||
ifeq ($(FLAG_DO_PROFILE), true)
|
ifeq ($(FLAG_DO_PROFILE), true)
|
||||||
$(warning Making profiling version of native library)
|
$(warning Making profiling version of native library)
|
||||||
LOCAL_LDFLAGS += -llog
|
|
||||||
else # FLAG_DO_PROFILE
|
else # FLAG_DO_PROFILE
|
||||||
ifeq ($(FLAG_DBG), true)
|
ifeq ($(FLAG_DBG), true)
|
||||||
$(warning Making debug version of native library)
|
$(warning Making debug version of native library)
|
||||||
LOCAL_LDFLAGS += -llog
|
|
||||||
endif # FLAG_DBG
|
endif # FLAG_DBG
|
||||||
endif # FLAG_DO_PROFILE
|
endif # FLAG_DO_PROFILE
|
||||||
|
|
||||||
|
@ -207,9 +207,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <android/log.h>
|
|
||||||
#define GAKLOGE(fmt, ...) __android_log_print(ANDROID_LOG_ERROR, "GGML", fmt, ##__VA_ARGS__)
|
|
||||||
#define GAKLOGI(fmt, ...) __android_log_print(ANDROID_LOG_INFO, "GGML", fmt, ##__VA_ARGS__)
|
|
||||||
|
|
||||||
#define GGML_FILE_MAGIC 0x67676d6c // "ggml"
|
#define GGML_FILE_MAGIC 0x67676d6c // "ggml"
|
||||||
#define GGML_FILE_VERSION 1
|
#define GGML_FILE_VERSION 1
|
||||||
@ -244,11 +241,11 @@
|
|||||||
|
|
||||||
#define GGML_PAD(x, n) (((x) + (n) - 1) & ~((n) - 1))
|
#define GGML_PAD(x, n) (((x) + (n) - 1) & ~((n) - 1))
|
||||||
|
|
||||||
|
#include <android/log.h>
|
||||||
#define GGML_ASSERT(x) \
|
#define GGML_ASSERT(x) \
|
||||||
do { \
|
do { \
|
||||||
if (!(x)) { \
|
if (!(x)) { \
|
||||||
GAKLOGE("GGML_ASSERT: %s:%d: %s\n", __FILE__, __LINE__, #x); \
|
__android_log_assert("", "GGML_ASSERT: ", "%s:%d: %s\n", __FILE__, __LINE__, #x); \
|
||||||
ggml_print_backtrace(); \
|
|
||||||
exit(1); \
|
exit(1); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user