Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configuring compile flags using Elixir config #274

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -74,6 +74,17 @@ You can enable certain features by doing the following:
export EXQLITE_SYSTEM_CFLAGS=-DSQLITE_ENABLE_DBSTAT_VTAB=1
```

Or you can pass extra environment variables using the Elixir config:

```elixir
config :exqlite,
force_build: true,
make_env: %{
"EXQLITE_SYSTEM_CFLAGS" => "-DSQLITE_ENABLE_DBSTAT_VTAB=1",
"V" => "1"
}
```

### Listing Flags Used For Compilation

If you `export V=1` the flags used for compilation will be output to stdout.
1 change: 1 addition & 0 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ defmodule Exqlite.MixProject do
versions: ["2.15", "2.16", "2.17"],
availability: &target_available_for_nif_version?/2
],
make_env: Application.get_env(:exqlite, :make_env, %{}),
cc_precompiler: cc_precompiler(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),