Skip to content

Commit db51ca6

Browse files
committed
cb: Enable Debugging builds, disable debugging mode for libvterm and MacOS CI
Disable debugging on MacOS CI, causes for some reasons it causes failure like this: ``` clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes -DEXITFREE -o objects/alloc.o alloc.c make[1]: *** [objects/os_macosx.o] Error 1 make[1]: *** Waiting for unfinished jobs.... In file included from alloc.c:14: ./vim.h:533:11: fatal error: 'sodium.h' file not found 533 | # include <sodium.h> | ^~~~~~~~~~ 1 error generated. make[1]: *** [objects/alloc.o] Error 1 make: *** [first] Error 2 ``` Signed-off-by: Christian Brabandt <[email protected]>
1 parent 76bdb82 commit db51ca6

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ jobs:
372372
if clang --version | grep -qs 'Apple clang version \(1[3-9]\|[2-9]\)\.'; then
373373
sed -i.bak -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
374374
fi
375+
# enabling debug mode breaks MacOS CI, cannot find header sodium.h, WTF?
376+
sed -i.bak -e "s/^CFLAGS =/#&/g" ${SRCDIR}/Makefile
375377
376378
- name: Build
377379
env:

src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ CClink = $(CC)
602602
#CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wmissing-prototypes
603603
#CFLAGS = -g -Wall -Wmissing-prototypes
604604
#CFLAGS = -O6 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
605-
#CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
605+
CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
606606
#CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
607607

608608
# Use this with GCC to check for mistakes, unused arguments, etc.

src/libvterm/src/vterm_internal.h

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
# define UNUSED
1818
#endif
1919

20+
#ifdef DEBUG
21+
#undef DEBUG
22+
#endif
23+
2024
#ifdef DEBUG
2125
# define DEBUG_LOG(s) fprintf(stderr, s)
2226
# define DEBUG_LOG1(s, a) fprintf(stderr, s, a)

0 commit comments

Comments
 (0)