summaryrefslogtreecommitdiff
path: root/lib/debugger
diff options
context:
space:
mode:
authorTom Davies <todavies5@gmail.com>2022-04-28 06:31:02 -0700
committerTom Davies <tomdavies@fb.com>2022-06-24 19:10:47 -0700
commitda001d9d75f2cac4ebc577d362a21ebff58080c6 (patch)
tree05c1b71f82bae64bfb5de91c9529e1f61aec2164 /lib/debugger
parenta22b140e4f456a0b872f3205e59f8f0d4ced7114 (diff)
downloaderlang-da001d9d75f2cac4ebc577d362a21ebff58080c6.tar.gz
make: Allow OTP to be built deterministically
Add a --enable-deterministic-build to the configure script, which sets ERL_DETERMINISTIC=yes throughout the relevant Makefiles, which then invoke the relevant build stages with the +deterministic option. This addresses absolute paths being included in generated .erl files and compiled .beam files that resulted in builds from different source directories generating different artefacts (which is a component of the issue in erlang#4482). I think it would make sense to make this the default at some stage, but I've put the change behind a flag for now to decouple making deterministic OTP builds possible from making them the default. Having +deterministic set results in compiler options being removed from the module info for modules where this options was used. This may have other implications for users of OTP. For tests themselves, +determinism is not set, since many test cases depend on accessing the test module's compilation options, or other features not available in deterministic mode, in order to configure themselves. For tests of the determinism feature specifically, +deterministic must be explicitly passed to the compiler within the relevant test cases.
Diffstat (limited to 'lib/debugger')
-rw-r--r--lib/debugger/test/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/debugger/test/Makefile b/lib/debugger/test/Makefile
index 14186798f0..015b5f9c29 100644
--- a/lib/debugger/test/Makefile
+++ b/lib/debugger/test/Makefile
@@ -71,6 +71,7 @@ RELSYSDIR = $(RELEASE_PATH)/debugger_test
ERL_MAKE_FLAGS +=
ERL_COMPILE_FLAGS +=
+ERL_COMPILE_FLAGS := $(filter-out +deterministic,$(ERL_COMPILE_FLAGS))
EBIN = .