warnings-clang.mk 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. CXXFLAGS_WARNINGS += -Wcast-align -Wcast-qual -Wmissing-prototypes -Wshift-count-negative -Wshift-count-overflow -Wshift-op-parentheses -Wshift-overflow -Wshift-sign-overflow -Wundef
  2. CFLAGS_WARNINGS += -Wcast-align -Wcast-qual -Wmissing-prototypes -Wshift-count-negative -Wshift-count-overflow -Wshift-op-parentheses -Wshift-overflow -Wshift-sign-overflow -Wundef
  3. CXXFLAGS_WARNINGS += -Wdeprecated -Wextra-semi -Wframe-larger-than=16000 -Wglobal-constructors -Wimplicit-fallthrough -Wmissing-declarations -Wnon-virtual-dtor -Wreserved-id-macro
  4. #CXXFLAGS_WARNINGS += -Wfloat-equal
  5. #CXXFLAGS_WARNINGS += -Wdocumentation
  6. #CXXFLAGS_WARNINGS += -Wconversion
  7. #CXXFLAGS_WARNINGS += -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++98-c++11-c++14-compat -Wno-padded -Wno-weak-vtables -Wno-sign-conversion -Wno-shadow-field-in-constructor -Wno-conversion -Wno-switch-enum -Wno-old-style-cast
  8. ifeq ($(MODERN),1)
  9. LDFLAGS += -fuse-ld=lld
  10. ifeq ($(OPTIMIZE_LTO),1)
  11. LDFLAGS += -Wl,--thinlto-jobs=all
  12. endif
  13. CXXFLAGS_WARNINGS +=
  14. CFLAGS_WARNINGS += -Wframe-larger-than=4000
  15. LDFLAGS_WARNINGS += -Wl,-no-undefined -Wl,--detect-odr-violations
  16. # re-renable after 1.29 branch
  17. #CXXFLAGS_WARNINGS += -Wdouble-promotion
  18. #CFLAGS_WARNINGS += -Wdouble-promotion
  19. endif
  20. CFLAGS_SILENT += -Wno-\#warnings
  21. CFLAGS_SILENT += -Wno-cast-align
  22. CFLAGS_SILENT += -Wno-cast-qual
  23. CFLAGS_SILENT += -Wno-missing-prototypes
  24. CFLAGS_SILENT += -Wno-sign-compare
  25. CFLAGS_SILENT += -Wno-unused-function
  26. CFLAGS_SILENT += -Wno-unused-parameter
  27. CFLAGS_SILENT += -Wno-unused-variable