Home | History | Annotate | Download | only in build
      1 #
      2 # Common global compiler configuration
      3 #
      4 
      5 # Common Compiler Flags ########################################################
      6 
      7 # CHRE requires C++11 and C99 support.
      8 COMMON_CXX_CFLAGS += -std=c++11
      9 COMMON_C_CFLAGS += -std=c99
     10 
     11 # Configure warnings.
     12 COMMON_CFLAGS += -Wall
     13 COMMON_CFLAGS += -Wextra
     14 COMMON_CFLAGS += -Wno-unused-parameter
     15 COMMON_CFLAGS += -Wshadow
     16 COMMON_CFLAGS += -Werror
     17 
     18 # Disable exceptions and RTTI.
     19 COMMON_CFLAGS += -fno-exceptions
     20 COMMON_CFLAGS += -fno-rtti
     21 
     22 # Enable the linker to garbage collect unused code and variables.
     23 COMMON_CFLAGS += -fdata-sections
     24 COMMON_CFLAGS += -ffunction-sections
     25 
     26 # Common Archive Flags #########################################################
     27 
     28 COMMON_ARFLAGS += rsc
     29