support sanitizers in build configs

This commit is contained in:
Günter Obiltschnig 2021-06-16 08:33:13 +02:00
parent 35a53d8f2d
commit ff6144f064
2 changed files with 12 additions and 9 deletions

View File

@ -12,6 +12,7 @@
LINKMODE ?= SHARED
ARCHFLAGS ?= -arch $(OSARCH)
SANITIZEFLAGS ?=
OSFLAGS ?= -mmacosx-version-min=10.11 -isysroot $(shell xcrun --show-sdk-path)
OPENSSL_DIR ?= /usr/local/opt/openssl
@ -43,11 +44,11 @@ SHAREDLIBLINKEXT = .dylib
#
# Compiler and Linker Flags
#
CFLAGS = $(ARCHFLAGS) $(OSFLAGS) -std=c99
CXXFLAGS = $(ARCHFLAGS) $(OSFLAGS) -std=c++14 -stdlib=libc++ -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration
LINKFLAGS = $(ARCHFLAGS) $(OSFLAGS) -stdlib=libc++
SHLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) -stdlib=libc++
DYLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) -stdlib=libc++
CFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -std=c11
CXXFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -std=c++14 -stdlib=libc++ -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration
LINKFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
SHLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
DYLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
STATICOPT_CC =
STATICOPT_CXX =
STATICOPT_LINK =

View File

@ -1,7 +1,7 @@
#
# Linux
#
# Make settings for Linux 2.6/gcc 3.3
# Make settings for Linux/gcc
#
#
@ -10,6 +10,8 @@
#
LINKMODE ?= SHARED
SANITIZEFLAGS ?=
#
# Define Tools
#
@ -36,13 +38,13 @@ SHAREDLIBLINKEXT = .so
#
# Compiler and Linker Flags
#
CFLAGS = -std=c99
CFLAGS = $(SANITIZEFLAGS) -std=c11
CFLAGS32 =
CFLAGS64 =
CXXFLAGS = -std=c++14 -Wall -Wno-sign-compare
CXXFLAGS = $(SANITIZEFLAGS) -std=c++14 -Wall -Wno-sign-compare
CXXFLAGS32 =
CXXFLAGS64 =
LINKFLAGS =
LINKFLAGS = $(SANITIZEFLAGS)
LINKFLAGS32 =
LINKFLAGS64 =
STATICOPT_CC =