From 653ce36ccf09355c77888c3a5593adba9eba9897 Mon Sep 17 00:00:00 2001 From: daquexian Date: Tue, 28 Jan 2020 13:48:24 +0800 Subject: [PATCH] Disable stacktrace on android --- onnxruntime/core/platform/posix/stacktrace.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/platform/posix/stacktrace.cc b/onnxruntime/core/platform/posix/stacktrace.cc index 73a4e2b274..8493364cc2 100644 --- a/onnxruntime/core/platform/posix/stacktrace.cc +++ b/onnxruntime/core/platform/posix/stacktrace.cc @@ -3,7 +3,9 @@ #include "core/common/common.h" +#ifndef __ANDROID__ #include +#endif #include namespace onnxruntime { @@ -11,7 +13,7 @@ namespace onnxruntime { std::vector GetStackTrace() { std::vector stack; -#ifndef NDEBUG +#if !defined(NDEBUG) && !defined(__ANDROID__) constexpr int kCallstackLimit = 64; // Maximum depth of callstack void* array[kCallstackLimit];