From f0c51be5f7bcf5a8675100a1e7f81ebfa7b6008a Mon Sep 17 00:00:00 2001 From: Jiho Chu Date: Tue, 27 Feb 2024 16:41:13 +0900 Subject: [PATCH] [Android] Fix for cxxflags It fixes android conf for CXX flags. It uses same flags as c initially. Signed-off-by: Jiho Chu --- jni/Android.mk.in | 6 +++--- jni/meson.build | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jni/Android.mk.in b/jni/Android.mk.in index 934959b34d..2d2e36ed7a 100644 --- a/jni/Android.mk.in +++ b/jni/Android.mk.in @@ -61,7 +61,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) LOCAL_ARM_NEON := true LOCAL_CFLAGS += -pthread -fexceptions -fopenmp -static-openmp @MESON_CFLAGS@ -DML_API_COMMON=1 -LOCAL_CXXFLAGS += -std=c++17 -frtti -fexceptions -DML_API_COMMON=1 +LOCAL_CXXFLAGS += -std=c++17 -frtti -fexceptions -DML_API_COMMON=1 @MESON_CXXFLAGS@ LOCAL_MODULE_TAGS := optional LOCAL_LDLIBS := -llog -landroid -fopenmp -static-openmp @@ -83,7 +83,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) LOCAL_ARM_NEON := true LOCAL_CFLAGS += -pthread -fexceptions -fopenmp -static-openmp @MESON_CFLAGS@ -DML_API_COMMON=1 -LOCAL_CXXFLAGS += -std=c++17 -frtti -fexceptions -DML_API_COMMON=1 -DVERSION_MAJOR=@VERSION_MAJOR@ -DVERSION_MINOR=@VERSION_MINOR@ -DVERSION_MICRO=@VERSION_MICRO@ +LOCAL_CXXFLAGS += -std=c++17 -frtti -fexceptions -DML_API_COMMON=1 -DVERSION_MAJOR=@VERSION_MAJOR@ -DVERSION_MINOR=@VERSION_MINOR@ -DVERSION_MICRO=@VERSION_MICRO@ @MESON_CXXFLAGS@ LOCAL_MODULE_TAGS := optional LOCAL_LDLIBS := -llog -landroid -fopenmp -static-openmp @@ -101,7 +101,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) LOCAL_ARM_NEON := true LOCAL_CFLAGS += -pthread -fexceptions -fopenmp -static-openmp @MESON_CFLAGS@ -DML_API_COMMON=1 -LOCAL_CXXFLAGS += -std=c++17 -frtti -fexceptions -DML_API_COMMON=1 +LOCAL_CXXFLAGS += -std=c++17 -frtti -fexceptions -DML_API_COMMON=1 @MESON_CXXFLAGS@ LOCAL_MODULE_TAGS := optional LOCAL_LDLIBS := -llog -landroid -fopenmp -static-openmp diff --git a/jni/meson.build b/jni/meson.build index 32a914b946..f3f66d34e1 100644 --- a/jni/meson.build +++ b/jni/meson.build @@ -15,6 +15,7 @@ message('compile flags are:' + ' '.join(flags)) flags = extra_defines + flags and_conf.set('MESON_CFLAGS', ' '.join(flags)) +and_conf.set('MESON_CXXFLAGS', ' '.join(flags)) and_conf.set('MESON_NNTRAINER_SRCS', ' '.join(nntrainer_sources)) and_conf.set('MESON_NNTRAINER_INCS', ' '.join(nntrainer_inc_abs)) and_conf.set('MESON_CCAPI_NNTRAINER_SRCS', ' '.join(ccapi_src))