mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Enable feature maybe_expr in the compiler for Erlang/OTP 26
Documentation: https://www.erlang.org/doc/system/expressions.html#maybe https://www.erlang.org/eeps/eep-0049 https://www.erlang.org/eeps/eep-0060
This commit is contained in:
parent
b759acdcea
commit
1ddd72ffe7
3 changed files with 4 additions and 1 deletions
1
mix.exs
1
mix.exs
|
@ -99,6 +99,7 @@ defmodule Ejabberd.MixProject do
|
|||
if_version_below(~c"25", [{:d, :OTP_BELOW_25}]) ++
|
||||
if_version_below(~c"26", [{:d, :OTP_BELOW_26}]) ++
|
||||
if_version_below(~c"27", [{:d, :OTP_BELOW_27}]) ++
|
||||
if_version_below(~c"27", [{:feature, :maybe_expr, :enable}]) ++
|
||||
if_version_below(~c"28", [{:d, :OTP_BELOW_28}])
|
||||
defines = for {:d, value} <- result, do: {:d, value}
|
||||
result ++ [{:d, :ALL_DEFS, defines}]
|
||||
|
|
|
@ -140,6 +140,7 @@
|
|||
{if_version_below, "25", {d, 'OTP_BELOW_25'}},
|
||||
{if_version_below, "26", {d, 'OTP_BELOW_26'}},
|
||||
{if_version_below, "27", {d, 'OTP_BELOW_27'}},
|
||||
{if_version_below, "27", {feature, maybe_expr, enable}},
|
||||
{if_version_below, "28", {d, 'OTP_BELOW_28'}},
|
||||
{if_var_false, debug, no_debug_info},
|
||||
{if_var_true, debug, debug_info},
|
||||
|
|
|
@ -678,7 +678,8 @@ maybe_define_lager_macro() ->
|
|||
end.
|
||||
|
||||
compile_options() ->
|
||||
[verbose, report_errors, report_warnings, debug_info, ?ALL_DEFS]
|
||||
[verbose, report_errors, report_warnings, debug_info, ?ALL_DEFS,
|
||||
{feature, maybe_expr, enable}]
|
||||
++ maybe_define_lager_macro()
|
||||
++ [{i, filename:join(app_dir(App), "include")}
|
||||
|| App <- [fast_xml, xmpp, p1_utils, ejabberd]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue