mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-03 10:45:37 +00:00
Improve handling of platform-specific build options (#2162)
* Opt into POSIX functions with `_POSIX_C_SOURCE` before any system headers are `#include`d * Allow user to override `make develop`'s `WARNFLAGS` and `CXXFLAGS` * Use `make develop` on 32-bit Cygwin with sanitizers disabled * Do not unnecessarily redefine `fseek` and `ftell` * Disable a false-positive `-Wno-null-dereference` on 32-bit Cygwin Co-authored-by: ISSOtm <[email protected]>
This commit is contained in:
1 parent
43bdeb873e
commit
b732f59472
23 files changed
+60
-40
No files matched your search
@@ -222,7 +222,7 @@ install: all
|
||||
# continous integration infrastructure return failure.
|
||||
# The rationale for some of the flags is documented in the CMakeLists.
|
||||
develop:
|
||||
$Q${MAKE} WARNFLAGS="${WARNFLAGS} -Werror -Wextra \
|
||||
$Q${MAKE} WARNFLAGS="-Werror -Wextra \
|
||||
-Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-branches -Wduplicated-cond \
|
||||
-Wfloat-equal -Wlogical-op -Wnull-dereference -Wold-style-cast -Wshift-overflow=2 \
|
||||
-Wstringop-overflow=4 -Wtrampolines -Wundef -Wuninitialized -Wunused -Wshadow \
|
||||
@@ -232,8 +232,9 @@ develop:
|
||||
-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_SANITIZE_VECTOR \
|
||||
-D_GLIBCXX_VERBOSE_ASSERT -D_GLIBCXX_EXTERN_TEMPLATE=0 \
|
||||
-D_LIBCPP_DEBUG -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG \
|
||||
-fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero" \
|
||||
CXXFLAGS="-ggdb3 -Og -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
||||
-fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero \
|
||||
${WARNFLAGS}" \
|
||||
CXXFLAGS="-ggdb3 -Og -fno-omit-frame-pointer -fno-optimize-sibling-calls ${CXXFLAGS}"
|
||||
|
||||
# Target used in development to debug with gdb.
|
||||
debug:
|
||||
|
||||
Reference in new issue
Block a user