Skip to content

Commit

Permalink
depends: Do not override CFLAGS when building SQLite with DEBUG=1
Browse files Browse the repository at this point in the history
The `--enable-debug` configure option for the SQLite package does two
things. It adds three preprocessor definitions and overrides CFLAGS with
"-g -O0". The latter breaks the user's ability to provide sanitizer and
LTO flags.
  • Loading branch information
hebasto committed Jan 25, 2024
1 parent 2b0dd88 commit 5fb8f0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion depends/packages/sqlite.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ $(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
$(package)_config_opts_debug=--enable-debug
# We avoid using `--enable-debug` because it overrides CFLAGS, a behavior we want to prevent.
$(package)_cflags_debug += -g
$(package)_cppflags_debug += -DSQLITE_DEBUG
$(package)_cppflags+=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED
$(package)_cppflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS
$(package)_cppflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT
Expand Down

0 comments on commit 5fb8f0f

Please sign in to comment.