Use CPPFLAGS instead of CFLAGS.

While we build these as C, to the build system they are technically
C++ and are subject to the global CPPFLAGS. Set LOCAL_CPPFLAGS here
instead of LOCAL_CFLAGS so we can be sure we override anything
provided by the build system.

Bug: http://b/23043421
Change-Id: Ie2284f3500bcd593781fc31cb6833d2cb3bc5020
This commit is contained in:
Dan Albert 2015-08-07 17:19:24 -07:00
parent 29145d69eb
commit 6d96f307eb
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := checkpolicy
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes)
LOCAL_CFLAGS := $(yacc_flags) $(common_cflags)
LOCAL_CPPFLAGS := $(yacc_flags) $(common_cflags)
LOCAL_SRC_FILES := $(common_src_files) checkpolicy.c
LOCAL_STATIC_LIBRARIES := libsepol
LOCAL_YACCFLAGS := -v
@ -54,7 +54,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := checkmodule
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes)
LOCAL_CFLAGS := $(yacc_flags) $(common_cflags)
LOCAL_CPPFLAGS := $(yacc_flags) $(common_cflags)
LOCAL_SRC_FILES := $(common_src_files) checkmodule.c
LOCAL_STATIC_LIBRARIES := libsepol
LOCAL_YACCFLAGS := -v

View File

@ -93,7 +93,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_COPY_HEADERS_TO := sepol
LOCAL_COPY_HEADERS := include/sepol/handle.h include/sepol/policydb.h cil/include/cil/cil.h
LOCAL_C_INCLUDES := $(common_includes)
LOCAL_CFLAGS := $(yacc_flags) $(common_cflags)
LOCAL_CPPFLAGS := $(yacc_flags) $(common_cflags)
LOCAL_SRC_FILES := $(common_src_files) $(cil_src_files)
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
@ -107,7 +107,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libsepol
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes)
LOCAL_CFLAGS := $(yacc_flags) $(common_cflags)
LOCAL_CPPFLAGS := $(yacc_flags) $(common_cflags)
LOCAL_SRC_FILES := $(common_src_files) $(cil_src_files)
LOCAL_MODULE_CLASS := STATIC_LIBRARIES