Updated C and C++ makefiles to exclude warnings and sanitizers by default, instead recommending extra flags for manually doing a diagnostic/debug build.

pull/65/head
Project Nayuki 6 years ago
parent 50d00ebf76
commit 7eac8beffe

@ -28,12 +28,11 @@
# - CC: The C compiler, such as gcc or clang. # - CC: The C compiler, such as gcc or clang.
# - CFLAGS: Any extra user-specified compiler flags (can be blank). # - CFLAGS: Any extra user-specified compiler flags (can be blank).
# Mandatory compiler flags # Recommended compiler flags:
CFLAGS += -std=c99 CFLAGS += -std=c99 -O
# Diagnostics. Adding '-fsanitize=address' is helpful for most versions of Clang and newer versions of GCC.
CFLAGS += -Wall -fsanitize=undefined # Extra flags for diagnostics:
# Optimization level # CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
CFLAGS += -O1
# ---- Controlling make ---- # ---- Controlling make ----

@ -28,12 +28,11 @@
# - CXX: The C++ compiler, such as g++ or clang++. # - CXX: The C++ compiler, such as g++ or clang++.
# - CXXFLAGS: Any extra user-specified compiler flags (can be blank). # - CXXFLAGS: Any extra user-specified compiler flags (can be blank).
# Mandatory compiler flags # Recommended compiler flags:
CXXFLAGS += -std=c++11 CXXFLAGS += -std=c++11 -O
# Diagnostics. Adding '-fsanitize=address' is helpful for most versions of Clang and newer versions of GCC.
CXXFLAGS += -Wall -fsanitize=undefined # Extra flags for diagnostics:
# Optimization level # CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
CXXFLAGS += -O1
# ---- Controlling make ---- # ---- Controlling make ----

Loading…
Cancel
Save