You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2018/03/09 10:46:30 UTC
[couchdb] branch master updated: Introduce bin_opt_info erl_opts
compilation option
This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new b58021e Introduce bin_opt_info erl_opts compilation option
b58021e is described below
commit b58021e6d9751fa36a4164974664e86248d444fd
Author: Jay Doane <ja...@gmail.com>
AuthorDate: Thu Mar 8 16:32:54 2018 -0800
Introduce bin_opt_info erl_opts compilation option
As discussed in
http://erlang.org/doc/efficiency_guide/binaryhandling.html, the
bin_opt_info option can have the compiler print information about
binary optimizations. Typically, it issues warnings about code that
can not be optimized. For example, with the option enabled, it warns
about this line of code (among many others) like this:
src/chttpd/src/chttpd_auth_cache.erl:183:
Warning: NOT OPTIMIZED: sub binary is used or returned
Not only should having this option enabled draw awareness to existing
sub-optimal binary constructs, it should help developers avoid
creating new ones.
---
rebar.config.script | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rebar.config.script b/rebar.config.script
index a52350f..7fb6999 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -92,7 +92,7 @@ AddConfig = [
{deps, lists:map(MakeDep, DepDescs)},
{sub_dirs, SubDirs},
{lib_dirs, ["src"]},
- {erl_opts, [debug_info, {i, "../"}]},
+ {erl_opts, [bin_opt_info, debug_info, {i, "../"}]},
{eunit_opts, [verbose]},
{plugins, [eunit_plugin]},
{dialyzer, [
--
To stop receiving notification emails like this one, please contact
jan@apache.org.