diff options
author | Björn Gustavsson <[email protected]> | 2013-12-19 10:15:40 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-12-19 10:15:40 +0100 |
commit | 7fcde0281c04170595d437dc0480f4cd690c6fde (patch) | |
tree | 353cf81814416569c645236a20fa2f8daff6d94f | |
parent | 3ee4bd41cdebf355447571fc9cb10b4fe5132ad9 (diff) | |
parent | 455c8238535d2754234cd68bbf7caba9960607d6 (diff) | |
download | otp-7fcde0281c04170595d437dc0480f4cd690c6fde.tar.gz otp-7fcde0281c04170595d437dc0480f4cd690c6fde.tar.bz2 otp-7fcde0281c04170595d437dc0480f4cd690c6fde.zip |
Merge branch 'ta/compiler/asm-core/OTP-11547'
* ta/compiler/asm-core/OTP-11547:
Officially support building core files
Officially support building assembler files
-rw-r--r-- | erts/doc/src/erlc.xml | 10 | ||||
-rw-r--r-- | lib/compiler/doc/src/compile.xml | 12 | ||||
-rw-r--r-- | lib/compiler/src/compile.erl | 6 | ||||
-rw-r--r-- | lib/compiler/test/compile_SUITE.erl | 4 |
4 files changed, 26 insertions, 6 deletions
diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml index 10cab344b0..c3fc3b1686 100644 --- a/erts/doc/src/erlc.xml +++ b/erts/doc/src/erlc.xml @@ -234,6 +234,16 @@ erlc +export_all file.erl</pre> from the shell.</p> <p>Supported options: -I, -o, -D, -v, -W, -b.</p> </item> + <tag>.S</tag> + <item> + <p>Erlang assembler source code. It generates a <c><![CDATA[.beam]]></c> file.</p> + <p>Supported options: same as for .erl.</p> + </item> + <tag>.core</tag> + <item> + <p>Erlang core source code. It generates a <c><![CDATA[.beam]]></c> file.</p> + <p>Supported options: same as for .erl.</p> + </item> <tag>.yrl</tag> <item> <p>Yecc source code. It generates an <c><![CDATA[.erl]]></c> file.</p> diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 73d75851cf..1459f696a0 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -350,12 +350,18 @@ module.beam: module.erl \ parsed code before the code is checked for errors.</p> </item> - <tag><c>asm</c></tag> + <tag><c>from_asm</c></tag> <item> <p>The input file is expected to be assembler code (default file suffix ".S"). Note that the format of assembler files - is not documented, and may change between releases - this - option is primarily for internal debugging use.</p> + is not documented, and may change between releases.</p> + </item> + + <tag><c>from_core</c></tag> + <item> + <p>The input file is expected to be core code (default + file suffix ".core"). Note that the format of core files + is not documented, and may change between releases.</p> </item> <tag><c>no_strict_record_tests</c></tag> diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 47d446273b..38a733751a 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -417,6 +417,10 @@ pass(from_core) -> pass(from_asm) -> {".S",[?pass(beam_consult_asm)|asm_passes()]}; pass(asm) -> + %% TODO: remove 'asm' in R18 + io:format("compile:file/2 option 'asm' has been deprecated and will be " + "removed in R18.~n" + "Use 'from_asm' instead.~n"), pass(from_asm); pass(from_beam) -> {".beam",[?pass(read_beam_file)|binary_passes()]}; @@ -1613,7 +1617,7 @@ compile_beam(File0, _OutFile, Opts) -> compile_asm(File0, _OutFile, Opts) -> File = shorten_filename(File0), - case file(File, [asm|make_erl_options(Opts)]) of + case file(File, [from_asm|make_erl_options(Opts)]) of {ok,_Mod} -> ok; Other -> Other end. diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl index 1dc1ddb653..4ec75d015e 100644 --- a/lib/compiler/test/compile_SUITE.erl +++ b/lib/compiler/test/compile_SUITE.erl @@ -769,8 +769,8 @@ do_core({M,A}, Outdir) -> error end. -%% Compile to Beam assembly language (.S) and the try to -%% run .S throught the compiler again. +%% Compile to Beam assembly language (.S) and then try to +%% run .S through the compiler again. asm(Config) when is_list(Config) -> ?line Dog = test_server:timetrap(test_server:minutes(20)), |