# Build configuration for worker CLI

# Memory management: ORC handles cycles, deterministic destruction
switch("mm", "orc")

# Enable threading for heartbeat
switch("threads", "on")

# Release mode optimizations
when defined(release):
  switch("opt", "size")
  switch("passC", "-flto")
  switch("passL", "-flto")

# Static SQLite compilation
switch("passC", "-DSQLITE_THREADSAFE=1")
switch("passC", "-DSQLITE_ENABLE_JSON1")
switch("passC", "-DSQLITE_OMIT_LOAD_EXTENSION")

# Compile SQLite amalgamation if present
when fileExists("libs/sqlite3.c"):
  switch("compile", "libs/sqlite3.c")
