trunk/makefile
| r243177 | r243178 | |
| 607 | 607 | # warnings only applicable to C++ compiles |
| 608 | 608 | CPPONLYFLAGS += \ |
| 609 | 609 | -Woverloaded-virtual |
| 610 | | |
| 611 | | include $(SRC)/build/cc_detection.mak |
| 612 | 610 | |
| 613 | 611 | ifdef SANITIZE |
| 614 | 612 | CCOMFLAGS += -fsanitize=$(SANITIZE) |
| 613 | |
| 615 | 614 | ifneq (,$(findstring thread,$(SANITIZE))) |
| 616 | 615 | CCOMFLAGS += -fPIE |
| 617 | 616 | endif |
| 618 | | ifneq (,$(findstring memory,$(SANITIZE))) |
| 619 | | ifneq (,$(findstring clang,$(CC))) |
| 620 | | CCOMFLAGS += -fsanitize-memory-track-origins -fPIE |
| 621 | 617 | endif |
| 622 | | endif |
| 623 | | ifneq (,$(findstring undefined,$(SANITIZE))) |
| 624 | | ifneq (,$(findstring clang,$(CC))) |
| 625 | | # TODO: check if linker is clang++ |
| 626 | | # produces a lot of messages - disable it for now |
| 627 | | CCOMFLAGS += -fno-sanitize=alignment |
| 628 | | # these are false positives because of the way our delegates work |
| 629 | | CCOMFLAGS += -fno-sanitize=function |
| 630 | | # clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled |
| 631 | | CCOMFLAGS += -fno-sanitize=shift |
| 632 | | # clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/hd6309.c when this isn't disabled |
| 633 | | CCOMFLAGS += -fno-sanitize=object-size |
| 634 | | # clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/konami.c, src/emu/cpu/m6809/hd6309.c, src/emu/video/psx.c when this isn't disabled |
| 635 | | CCOMFLAGS += -fno-sanitize=vptr |
| 636 | | # clang takes forever to compile src/emu/video/psx.c when this isn't disabled |
| 637 | | CCOMFLAGS += -fno-sanitize=null |
| 638 | | # clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled |
| 639 | | CCOMFLAGS += -fno-sanitize=signed-integer-overflow |
| 640 | | endif |
| 641 | | endif |
| 642 | | endif |
| 643 | 618 | |
| 619 | include $(SRC)/build/cc_detection.mak |
| 620 | |
| 644 | 621 | #------------------------------------------------- |
| 645 | 622 | # include paths |
| 646 | 623 | #------------------------------------------------- |
trunk/src/build/flags_clang.mak
| r243177 | r243178 | |
| 9 | 9 | # caused by src/mame/video/jagblit.inc on older clang versions |
| 10 | 10 | CCOMFLAGS += -Wno-constant-logical-operand |
| 11 | 11 | |
| 12 | ifneq (,$(findstring undefined,$(SANITIZE))) |
| 13 | # TODO: check if linker is clang++ |
| 14 | # produces a lot of messages - disable it for now |
| 15 | CCOMFLAGS += -fno-sanitize=alignment |
| 16 | # these are false positives because of the way our delegates work |
| 17 | CCOMFLAGS += -fno-sanitize=function |
| 18 | endif |
| 19 | |
| 20 | ifneq (,$(findstring memory,$(SANITIZE))) |
| 21 | CCOMFLAGS += -fsanitize-memory-track-origins -fPIE |
| 22 | endif |
| 23 | |
| 12 | 24 | # TODO: needs to use $(CC) |
| 13 | 25 | TEST_CLANG := $(shell clang --version) |
| 14 | 26 | |
| r243177 | r243178 | |
| 29 | 41 | CCOMFLAGS += -Wno-unknown-warning-option |
| 30 | 42 | # XCode 6.0.1 gives this when using SDL2 in /Library/Frameworks/SDL2.framework/Headers/SDL_syswm.h:150 included from src/osd/sdl/sdlinc.h |
| 31 | 43 | CCOMFLAGS += -Wno-extern-c-compat |
| 44 | |
| 45 | ifneq (,$(findstring undefined,$(SANITIZE))) |
| 46 | # clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled |
| 47 | CCOMFLAGS += -fno-sanitize=shift |
| 48 | # clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/hd6309.c when this isn't disabled |
| 49 | CCOMFLAGS += -fno-sanitize=object-size |
| 50 | # clang takes forever to compile src/emu/cpu/tms57002/tms57002.c, src/emu/cpu/m6809/konami.c, src/emu/cpu/m6809/hd6309.c, src/emu/video/psx.c when this isn't disabled |
| 51 | CCOMFLAGS += -fno-sanitize=vptr |
| 52 | # clang takes forever to compile src/emu/video/psx.c when this isn't disabled |
| 53 | CCOMFLAGS += -fno-sanitize=null |
| 54 | # clang takes forever to compile src/emu/cpu/tms57002/tms57002.c when this isn't disabled |
| 55 | CCOMFLAGS += -fno-sanitize=signed-integer-overflow |
| 32 | 56 | endif |
| 57 | endif |
| 33 | 58 | |
| 34 | 59 | ifeq ($(TARGETOS),emscripten) |
| 35 | 60 | CCOMFLAGS += -Qunused-arguments |