Files
rk35xx-android14/system/chre/build/tools_config.mk
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

44 lines
1.1 KiB
Makefile

#
# Common global compiler configuration
#
# Common Compiler Flags ########################################################
# CHRE requires C++17 and C11 support.
COMMON_CXX_CFLAGS += -std=c++17
COMMON_C_CFLAGS += -x c
COMMON_C_CFLAGS += -std=c11
# Configure 'all' and 'extra' warnings and promote warnings to errors.
COMMON_CFLAGS += -Wall
COMMON_CFLAGS += -Wextra
COMMON_CFLAGS += -Werror
# Disabled warnings. You better have a good reason to add more here.
COMMON_CFLAGS += -Wno-unused-parameter
# Additional warnings. Even more! :]
COMMON_CFLAGS += -Wshadow
COMMON_CFLAGS += -Wdouble-promotion
# Disable exceptions and RTTI.
COMMON_CXX_CFLAGS += -fno-exceptions
COMMON_CXX_CFLAGS += -fno-rtti
# Enable the linker to garbage collect unused code and variables.
COMMON_CFLAGS += -fdata-sections
COMMON_CFLAGS += -ffunction-sections
# Enable debugging symbols for debug builds.
COMMON_DEBUG_CFLAGS += -g
# Dependency Resolution
DEP_CFLAGS = -MM -MG -MP -MF $$(basename $$@).d
# Compile with hidden visibility by default.
COMMON_CFLAGS += -fvisibility=hidden
# Common Archive Flags #########################################################
COMMON_ARFLAGS += rsc