Only set flifetime-dse flag for GCC and not Clang
This commit is contained in:
parent
ba8089e1f3
commit
ea1cdde3bf
1 changed files with 6 additions and 2 deletions
|
@ -39,10 +39,14 @@ else
|
|||
ARCH_CFLAGS+=-gdwarf-2 -g2
|
||||
endif
|
||||
|
||||
BASE_CFLAGS=-std=c++17 -fpermissive -fno-strict-aliasing -fno-exceptions -fexpensive-optimizations -Werror=return-type -w
|
||||
BASE_CFLAGS+=-DNDEBUG -DPOSIX -D_POSIX -DLINUX -D_LINUX -DGNUC -DNO_MALLOC_OVERRIDE -DCLIENT_WEAPONS
|
||||
|
||||
# flifetime-dse=1 is needed to disable a compiler optimization that optimizes out std::memset calls in CBaseEntity::operator new
|
||||
# See https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flifetime-dse for more information about the flifetime-dse flag
|
||||
BASE_CFLAGS=-std=c++17 -fpermissive -fno-strict-aliasing -fno-exceptions -fexpensive-optimizations -Werror=return-type -w -flifetime-dse=1
|
||||
BASE_CFLAGS+=-DNDEBUG -DPOSIX -D_POSIX -DLINUX -D_LINUX -DGNUC -DNO_MALLOC_OVERRIDE -DCLIENT_WEAPONS
|
||||
ifeq "$(COMPILER)" "g++"
|
||||
BASE_CFLAGS+=-flifetime-dse=1
|
||||
endif
|
||||
|
||||
SHLIBEXT=so
|
||||
SHLIBCFLAGS=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue