From 3a34f37fbc5af8eca7a70f5dab61dca7ee1706b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Fri, 5 Oct 2018 10:06:35 +0200 Subject: compiler: Forward +source flag to epp and fix bug in +deterministic The source file path as given to `erlc` was included in an implicit file attribute inserted by epp, even when the +source flag was set to something else which was a bit surprising. It was also included when +deterministic was specified, breaking the flag's promise. This commit forwards the +source flag to epp so it inserts the right information, and if +deterministic is given it will be shaved to just the base name of the file, guaranteeing the same result regardless of how the input is reached. --- lib/compiler/doc/src/compile.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 1a71c83521..cfbd4c7fda 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -203,7 +203,8 @@ deterministic

Omit the options and source tuples in - the list returned by Module:module_info(compile). + the list returned by Module:module_info(compile), and + reduce the paths in stack traces to the module name alone. This option will make it easier to achieve reproducible builds.

@@ -347,8 +348,8 @@ module.beam: module.erl \ {source,FileName} -

Sets the value of the source, as returned by - module_info(compile).

+

Overrides the source file name as presented in + module_info(compile) and stack traces.

{outdir,Dir} -- cgit v1.2.3