Skip to content

Commit efdfd6c

Browse files
author
Dylan Storey
committed
Use vendored SQLite headers exclusively for ABI consistency
1 parent 833258c commit efdfd6c

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

Makefile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ SQLITE ?= sqlite3
88
# Override with: make PYTHON=python3.12 test-python
99
PYTHON ?= python3.11
1010

11-
# Platform-specific paths (override for local development)
12-
# macOS with MacPorts: make EXTRA_INCLUDES=-I/opt/local/include EXTRA_LIBS=-L/opt/local/lib
11+
# Platform-specific paths (for test runner linking only, not extension builds)
12+
# macOS with MacPorts: make EXTRA_LIBS=-L/opt/local/lib
1313
# macOS with Homebrew: make SQLITE=$(brew --prefix)/bin/sqlite3
14-
EXTRA_INCLUDES ?=
1514
EXTRA_LIBS ?=
1615

1716
# Vendored SQLite headers for consistent extension builds
@@ -20,10 +19,10 @@ VENDOR_SQLITE_DIR = vendor/sqlite
2019
# Build mode: debug (default) or release
2120
# Use: make extension RELEASE=1
2221
ifdef RELEASE
23-
CFLAGS = -Wall -Wextra -O2 -I./src/include $(EXTRA_INCLUDES)
22+
CFLAGS = -Wall -Wextra -O2 -I$(VENDOR_SQLITE_DIR) -I./src/include
2423
else
2524
# Add -DGRAPHQLITE_PERF_TIMING for detailed query timing instrumentation
26-
CFLAGS = -Wall -Wextra -g -I./src/include $(EXTRA_INCLUDES) -DGRAPHQLITE_DEBUG
25+
CFLAGS = -Wall -Wextra -g -I$(VENDOR_SQLITE_DIR) -I./src/include -DGRAPHQLITE_DEBUG
2726
endif
2827
LDFLAGS = $(EXTRA_LIBS) -lcunit -lsqlite3
2928

@@ -209,7 +208,7 @@ $(BUILD_DIR)/main.o: $(SRC_DIR)/main.c | dirs
209208

210209
# Extension object (uses vendored SQLite headers for ABI consistency)
211210
$(BUILD_DIR)/extension.o: $(SRC_DIR)/extension.c | dirs
212-
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -I$(VENDOR_SQLITE_DIR) -I$(SRC_DIR) -c $< -o $@
211+
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -c $< -o $@
213212

214213

215214
# Help target
@@ -294,21 +293,21 @@ $(BUILD_EXECUTOR_DIR)/%.o: $(EXECUTOR_DIR)/%.c | dirs
294293
$(BUILD_EXECUTOR_DIR)/%.cov.o: $(EXECUTOR_DIR)/%.c | dirs
295294
$(CC) $(CFLAGS) $(COVERAGE_FLAGS) -c $< -o $@
296295

297-
# PIC object builds for shared library (uses vendored SQLite headers for ABI consistency)
296+
# PIC object builds for shared library (uses vendored SQLite headers via CFLAGS)
298297
$(BUILD_PARSER_DIR)/%.pic.o: $(PARSER_DIR)/%.c $(GRAMMAR_HDR) | dirs
299-
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -I$(VENDOR_SQLITE_DIR) -I$(BUILD_PARSER_DIR) -c $< -o $@
298+
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -I$(BUILD_PARSER_DIR) -c $< -o $@
300299

301300
$(BUILD_PARSER_DIR)/cypher_scanner.pic.o: $(SCANNER_SRC) | dirs
302-
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -I$(VENDOR_SQLITE_DIR) -Wno-sign-compare -c $< -o $@
301+
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -Wno-sign-compare -c $< -o $@
303302

304303
$(BUILD_PARSER_DIR)/cypher_gram.tab.pic.o: $(GRAMMAR_SRC) $(GRAMMAR_HDR) | dirs
305-
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -I$(VENDOR_SQLITE_DIR) -Wno-unused-but-set-variable -I$(BUILD_PARSER_DIR) -c $< -o $@
304+
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -Wno-unused-but-set-variable -I$(BUILD_PARSER_DIR) -c $< -o $@
306305

307306
$(BUILD_TRANSFORM_DIR)/%.pic.o: $(TRANSFORM_DIR)/%.c | dirs
308-
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -I$(VENDOR_SQLITE_DIR) -c $< -o $@
307+
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -c $< -o $@
309308

310309
$(BUILD_EXECUTOR_DIR)/%.pic.o: $(EXECUTOR_DIR)/%.c | dirs
311-
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -I$(VENDOR_SQLITE_DIR) -c $< -o $@
310+
$(CC) $(CFLAGS) $(EXTENSION_CFLAGS) -fPIC -c $< -o $@
312311

313312
# Test objects
314313
$(BUILD_TEST_DIR)/%.o: $(TEST_DIR)/%.c $(GRAMMAR_HDR) | dirs

bindings/python/src/graphqlite/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .connection import Connection, connect, wrap
88
from .graph import Graph, graph, escape_string, sanitize_rel_type, CYPHER_RESERVED
99

10-
__version__ = "0.1.0b1"
10+
__version__ = "0.1.0b2"
1111
__all__ = [
1212
"Connection", "connect", "wrap", "load", "loadable_path",
1313
"Graph", "graph", "escape_string", "sanitize_rel_type", "CYPHER_RESERVED"

bindings/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graphqlite"
3-
version = "0.1.0-beta.1"
3+
version = "0.1.0-beta.2"
44
edition = "2021"
55
description = "SQLite extension for graph queries using Cypher"
66
license = "MIT"

0 commit comments

Comments
 (0)