aboutsummaryrefslogtreecommitdiff
path: root/mix.exs
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-02-08 15:38:04 +0100
committerBadlop <badlop@process-one.net>2022-02-11 09:39:16 +0100
commitf7c7d784c47179fcdfc77fde3dea8b3d4e4f9308 (patch)
treed37e7d4e3170bd3a7fb217d29fa87058927b4448 /mix.exs
parentAdd forgotten option NO_CUSTOMIZE_HOSTNAME_CHECK to mix.exs (diff)
Detect debug option, and maybe disable debug_info
As explained in https://hexdocs.pm/mix/1.13.2/Mix.Tasks.Compile.Erlang.html > The option :debug_info is always added to the end of it. You can disable that using: > erlc_options: [debug_info: false]
Diffstat (limited to 'mix.exs')
-rw-r--r--mix.exs4
1 files changed, 3 insertions, 1 deletions
diff --git a/mix.exs b/mix.exs
index a968477bf..ebf8699ba 100644
--- a/mix.exs
+++ b/mix.exs
@@ -78,7 +78,7 @@ defmodule Ejabberd.MixProject do
defp erlc_options do
# Use our own includes + includes from all dependencies
includes = ["include"] ++ deps_include(["fast_xml", "xmpp", "p1_utils"])
- result = [:debug_info, {:d, :ELIXIR_ENABLED}] ++
+ result = [{:d, :ELIXIR_ENABLED}] ++
cond_options() ++
Enum.map(includes, fn (path) -> {:i, path} end) ++
if_version_above('20', [{:d, :DEPRECATED_GET_STACKTRACE}]) ++
@@ -98,6 +98,8 @@ defmodule Ejabberd.MixProject do
defp cond_options do
for {:true, option} <- [{config(:sip), {:d, :SIP}},
{config(:stun), {:d, :STUN}},
+ {config(:debug), :debug_info},
+ {not config(:debug), {:debug_info, false}},
{config(:roster_gateway_workaround), {:d, :ROSTER_GATEWAY_WORKAROUND}},
{config(:new_sql_schema), {:d, :NEW_SQL_SCHEMA}}
], do: