From 8f725574800d559a1d71e43ab5f21c0bcb6fa142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 23 Oct 2018 09:11:27 +0200 Subject: Add a diffable option for the compiler Add the `diffable` option to produce a more diff-friendly output in a .S file. In a diffable .S file, label numbers starts from 1 in each function and local function calls use function names instead of labels. scripts/diffable produces diff-friendly files but only for a hard-coded sub set of files in OTP. Having the option directly in the compiler makes is easier to diff the BEAM code for arbitrary source modules. --- lib/compiler/test/compile_SUITE.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/compiler/test') diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl index 5656743c76..8d8bbe9543 100644 --- a/lib/compiler/test/compile_SUITE.erl +++ b/lib/compiler/test/compile_SUITE.erl @@ -396,6 +396,7 @@ do_file_listings(DataDir, PrivDir, [File|Files]) -> do_listing(Simple, TargetDir, dclean, ".clean"), do_listing(Simple, TargetDir, dpeep, ".peep"), do_listing(Simple, TargetDir, dopt, ".optimize"), + do_listing(Simple, TargetDir, diffable, ".S"), %% First clean up. Listings = filename:join(PrivDir, listings), -- cgit v1.2.3