Updated C and C++ makefiles to exclude warnings and sanitizers by default, instead recommending extra flags for manually doing a diagnostic/debug build.
This commit is contained in:
parent
50d00ebf76
commit
7eac8beffe
11
c/Makefile
11
c/Makefile
|
@ -28,12 +28,11 @@
|
|||
# - CC: The C compiler, such as gcc or clang.
|
||||
# - CFLAGS: Any extra user-specified compiler flags (can be blank).
|
||||
|
||||
# Mandatory compiler flags
|
||||
CFLAGS += -std=c99
|
||||
# Diagnostics. Adding '-fsanitize=address' is helpful for most versions of Clang and newer versions of GCC.
|
||||
CFLAGS += -Wall -fsanitize=undefined
|
||||
# Optimization level
|
||||
CFLAGS += -O1
|
||||
# Recommended compiler flags:
|
||||
CFLAGS += -std=c99 -O
|
||||
|
||||
# Extra flags for diagnostics:
|
||||
# CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
|
||||
|
||||
|
||||
# ---- Controlling make ----
|
||||
|
|
11
cpp/Makefile
11
cpp/Makefile
|
@ -28,12 +28,11 @@
|
|||
# - CXX: The C++ compiler, such as g++ or clang++.
|
||||
# - CXXFLAGS: Any extra user-specified compiler flags (can be blank).
|
||||
|
||||
# Mandatory compiler flags
|
||||
CXXFLAGS += -std=c++11
|
||||
# Diagnostics. Adding '-fsanitize=address' is helpful for most versions of Clang and newer versions of GCC.
|
||||
CXXFLAGS += -Wall -fsanitize=undefined
|
||||
# Optimization level
|
||||
CXXFLAGS += -O1
|
||||
# Recommended compiler flags:
|
||||
CXXFLAGS += -std=c++11 -O
|
||||
|
||||
# Extra flags for diagnostics:
|
||||
# CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
|
||||
|
||||
|
||||
# ---- Controlling make ----
|
||||
|
|
Loading…
Reference in New Issue