Skip to content

Commit

Permalink
disable the address sanitizer for now, add LOAD 'quack' to get our _P…
Browse files Browse the repository at this point in the history
…G_init function to run
  • Loading branch information
Tishj committed Apr 10, 2024
1 parent fb3b0a4 commit 971bdb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
PG_LIB := $(shell $(PG_CONFIG) --pkglibdir)

DEBUG_FLAGS = -g -O0
override PG_CPPFLAGS += $(DEBUG_FLAGS) -Iinclude -Ithird_party/duckdb/src/include -std=c++17
DEBUG_FLAGS = -g -O0 -fsanitize=address
override PG_CPPFLAGS += -Iinclude -Ithird_party/duckdb/src/include -std=c++17

SHLIB_LINK += -Wl,-rpath,$(PG_LIB)/ -lpq -L$(PG_LIB) -lduckdb -Lthird_party/duckdb/build/debug/src -lstdc++

Expand Down Expand Up @@ -48,7 +48,7 @@ third_party/duckdb:
git submodule update --init --recursive

third_party/duckdb/build/debug/src/$(DUCKDB_LIB):
$(MAKE) -C third_party/duckdb debug
$(MAKE) -C third_party/duckdb debug DISABLE_SANITIZER=1

install_duckdb:
$(install_bin) -m 755 third_party/duckdb/build/debug/src/$(DUCKDB_LIB) $(DESTDIR)$(PG_LIB)
Expand Down
1 change: 1 addition & 0 deletions quack--0.0.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOAD 'quack';
1 change: 1 addition & 0 deletions src/quack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ PG_MODULE_MAGIC;

void
_PG_init(void) {
elog(INFO, "quack extension initialized");
quack_init_guc();
quack_init_hooks();
}
Expand Down

0 comments on commit 971bdb6

Please sign in to comment.