add a check for env var to optionally compile without support for

erlang maps
This commit is contained in:
alisdair sullivan 2014-04-16 00:06:45 +00:00
parent ffa3fb5eae
commit 4d058d1616

View file

@ -1,6 +1,6 @@
application:start(compiler), application:start(compiler),
case {erlang:system_info(version), application:get_key(compiler, vsn)} of case {erlang:system_info(version), application:get_key(compiler, vsn), os:getenv("JSX_NO_MAPS")} of
{X, {ok, Y}} when X >= "6.0" andalso Y >= "5.0" -> {X, {ok, Y}, false} when X >= "6.0" andalso Y >= "5.0" ->
CONFIG ++ [{erl_opts, [{d, release_supports_maps}]}]; CONFIG ++ [{erl_opts, [{d, release_supports_maps}]}];
_ -> CONFIG _ -> CONFIG
end. end.