mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
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]
This commit is contained in:
parent
0b9263bc15
commit
f7c7d784c4
4
mix.exs
4
mix.exs
@ -78,7 +78,7 @@ defmodule Ejabberd.MixProject do
|
|||||||
defp erlc_options do
|
defp erlc_options do
|
||||||
# Use our own includes + includes from all dependencies
|
# Use our own includes + includes from all dependencies
|
||||||
includes = ["include"] ++ deps_include(["fast_xml", "xmpp", "p1_utils"])
|
includes = ["include"] ++ deps_include(["fast_xml", "xmpp", "p1_utils"])
|
||||||
result = [:debug_info, {:d, :ELIXIR_ENABLED}] ++
|
result = [{:d, :ELIXIR_ENABLED}] ++
|
||||||
cond_options() ++
|
cond_options() ++
|
||||||
Enum.map(includes, fn (path) -> {:i, path} end) ++
|
Enum.map(includes, fn (path) -> {:i, path} end) ++
|
||||||
if_version_above('20', [{:d, :DEPRECATED_GET_STACKTRACE}]) ++
|
if_version_above('20', [{:d, :DEPRECATED_GET_STACKTRACE}]) ++
|
||||||
@ -98,6 +98,8 @@ defmodule Ejabberd.MixProject do
|
|||||||
defp cond_options do
|
defp cond_options do
|
||||||
for {:true, option} <- [{config(:sip), {:d, :SIP}},
|
for {:true, option} <- [{config(:sip), {:d, :SIP}},
|
||||||
{config(:stun), {:d, :STUN}},
|
{config(:stun), {:d, :STUN}},
|
||||||
|
{config(:debug), :debug_info},
|
||||||
|
{not config(:debug), {:debug_info, false}},
|
||||||
{config(:roster_gateway_workaround), {:d, :ROSTER_GATEWAY_WORKAROUND}},
|
{config(:roster_gateway_workaround), {:d, :ROSTER_GATEWAY_WORKAROUND}},
|
||||||
{config(:new_sql_schema), {:d, :NEW_SQL_SCHEMA}}
|
{config(:new_sql_schema), {:d, :NEW_SQL_SCHEMA}}
|
||||||
], do:
|
], do:
|
||||||
|
Loading…
Reference in New Issue
Block a user