aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Rascao <[email protected]>2017-02-27 23:32:38 +0000
committerLuis Rascao <[email protected]>2017-03-11 10:38:08 +0000
commit7aa3c7e15781e74c69942c02f22db3fd5a1a26af (patch)
tree8bce266b189d587c32313d7a8047d705b8571771
parent87faa210dd6a5589ff86a9cc6992a413022feea7 (diff)
downloadrelx-7aa3c7e15781e74c69942c02f22db3fd5a1a26af.tar.gz
relx-7aa3c7e15781e74c69942c02f22db3fd5a1a26af.tar.bz2
relx-7aa3c7e15781e74c69942c02f22db3fd5a1a26af.zip
Don't drop debug info on default build
Drop it only when generating relx escript.
-rw-r--r--README.md2
-rw-r--r--bootstrap.cmd2
-rw-r--r--rebar.config11
3 files changed, 11 insertions, 4 deletions
diff --git a/README.md b/README.md
index b9e1073..059ca90 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Building
To build relx and generate a standalone escript executable:
$ ./rebar3 update
- $ ./rebar3 escriptize
+ $ ./rebar3 as escript escriptize
This creates the executable `_build/default/bin/relx`.
diff --git a/bootstrap.cmd b/bootstrap.cmd
index 4deb2a3..1bbd00d 100644
--- a/bootstrap.cmd
+++ b/bootstrap.cmd
@@ -3,7 +3,7 @@
:: Get dependencies, compile and escriptize relx
@cmd /c @rebar3 update
-@cmd /c @rebar3 escriptize
+@cmd /c @rebar3 as escript escriptize
:: Create a shortcut file for running the relx command
@set relx_cmd=relx.cmd
diff --git a/rebar.config b/rebar.config
index 664a5a8..395fdd7 100644
--- a/rebar.config
+++ b/rebar.config
@@ -17,7 +17,6 @@
[{platform_define, "^[0-9]+", namespaced_types},
{platform_define, "^1[8|9]", rand_module},
{platform_define, "^2", rand_module},
- no_debug_info,
warnings_as_errors,
inline]}.
@@ -39,7 +38,15 @@
{add, getopt, [{erl_opts, [debug_info]}]},
{add, bbmustache, [{erl_opts, [debug_info]}]},
{add, cf, [{erl_opts, [debug_info]}]}]},
- {erl_opts, [debug_info]}]}
+ {erl_opts, [debug_info]}]},
+ {escript, [
+ {overrides, [{add, erlware_commons, [{erl_opts, [no_debug_info]}]},
+ {add, providers, [{erl_opts, [no_debug_info]}]},
+ {add, getopt, [{erl_opts, [no_debug_info]}]},
+ {add, bbmustache, [{erl_opts, [no_debug_info]}]},
+ {add, cf, [{erl_opts, [no_debug_info]}]}]},
+ {erl_opts, [no_debug_info]}
+ ]}
]}.
{overrides, [{override, erlware_commons, [