-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler: Improve deterministic builds #5965
Commits on May 6, 2022
-
compiler: Make EPP respect +deterministic
Makes the EPP module use basenames rather than absolute paths for all -file attributes / ?FILE macros when +deterministic is set. Previously, EPP did not respect +deterministic in all scenarios, so build output could still contain absolute paths.
Configuration menu - View commit details
-
Copy full SHA for af9b14c - Browse repository at this point
Copy the full SHA af9b14cView commit details -
compiler: Make asn1ct_gen respect +deterministic
Makes asn1ct_gen filter out potentially non-deterministic attributes from generated .erl files when +deterministic is set.
Configuration menu - View commit details
-
Copy full SHA for ebda708 - Browse repository at this point
Copy the full SHA ebda708View commit details -
compiler: Make leex respect +deterministic
Makes generated leex scanners only use basenames in generated -file attributes, rather than absolute paths when +deterministic is set.
Configuration menu - View commit details
-
Copy full SHA for d8014fb - Browse repository at this point
Copy the full SHA d8014fbView commit details -
compiler: Make yecc respect +deterministic
Makes generated yecc parsers use only basenames in generated -file attributes rather than absolute paths when +deterministic is set.
Configuration menu - View commit details
-
Copy full SHA for 883d86c - Browse repository at this point
Copy the full SHA 883d86cView commit details -
compiler: Make compiler forward +determinsitic flag to epp
Makes compile pass along the +deterministic flag for epp to utilise.
Configuration menu - View commit details
-
Copy full SHA for 8d87cd6 - Browse repository at this point
Copy the full SHA 8d87cd6View commit details -
compiler: Make test_lib robust to +deterministic
Makes test_lib avoid a crash if +deterministic is enabled to tests. +deterministic strips the compilation options entirely, which test_lib wasn't able to handle. Now, an empty list is returned in that case.
Configuration menu - View commit details
-
Copy full SHA for a22b140 - Browse repository at this point
Copy the full SHA a22b140View commit details
Commits on Jun 25, 2022
-
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 #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.
Configuration menu - View commit details
-
Copy full SHA for da001d9 - Browse repository at this point
Copy the full SHA da001d9View commit details