aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2012-07-18 11:00:42 +0200
committerHenrik Nord <[email protected]>2012-07-18 11:00:47 +0200
commit3ad520ad95e79fe5dc63f017f37f043e5a84e3e8 (patch)
tree8877697620eac37c56b2fe33b720901506d226ec /lib/compiler/src
parente10b54d9b94c5deb821a708a5ae7e72d34fd0f14 (diff)
parent2d785c07fbf9f533bf4627a65315a51c3efc2113 (diff)
downloadotp-3ad520ad95e79fe5dc63f017f37f043e5a84e3e8.tar.gz
otp-3ad520ad95e79fe5dc63f017f37f043e5a84e3e8.tar.bz2
otp-3ad520ad95e79fe5dc63f017f37f043e5a84e3e8.zip
Merge branch 'jv/forms-source' into maint
* jv/forms-source: Allow the source to be set when compiling forms OTP-10150
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/compile.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 9b505ad15c..7911f51a73 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -247,10 +247,12 @@ internal(Master, Input, Opts) ->
catch error:Reason -> {error, Reason}
end}.
-internal({forms,Forms}, Opts) ->
- {_,Ps} = passes(forms, Opts),
- internal_comp(Ps, "", "", #compile{code=Forms,options=Opts,
- mod_options=Opts});
+internal({forms,Forms}, Opts0) ->
+ {_,Ps} = passes(forms, Opts0),
+ Source = proplists:get_value(source, Opts0, ""),
+ Opts1 = proplists:delete(source, Opts0),
+ Compile = #compile{code=Forms,options=Opts1,mod_options=Opts1},
+ internal_comp(Ps, Source, "", Compile);
internal({file,File}, Opts) ->
{Ext,Ps} = passes(file, Opts),
Compile = #compile{options=Opts,mod_options=Opts},