Skip to content

Use the +deterministic compiler flag when building with Make #3442

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

Merged
merged 2 commits into from
Sep 17, 2021

Conversation

HoloRin
Copy link
Contributor

@HoloRin HoloRin commented Sep 17, 2021

Proposed Changes

This matches changes on the bazel side of the build to compile with the deterministic option to reduce the variation in built files.

Types of Changes

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further Comments

See #3440 & c73ece2

@mergify mergify bot added the make label Sep 17, 2021
@HoloRin
Copy link
Contributor Author

HoloRin commented Sep 17, 2021

Tested with make run-broker and make -C deps/rabbitmq_cli tests. Seems to be fine.

@lhoguin, @dumbbell look okay to you?

@HoloRin
Copy link
Contributor Author

HoloRin commented Sep 17, 2021

Lager and +deterministic did not play well together, so this should not be applied to v3.8.x.

@HoloRin HoloRin merged commit 0b545bf into master Sep 17, 2021
@HoloRin HoloRin deleted the deterministic-flag-make branch September 17, 2021 11:59
HoloRin added a commit that referenced this pull request Sep 17, 2021
Use the +deterministic compiler flag when building with Make (backport #3442)
mergify bot pushed a commit that referenced this pull request May 17, 2025
Building from source using this command:

```
make RMQ_ERLC_OPTS= FULL=1
```

... then starting RabbitMQ via `make run-broker`, allows re-compilation
from the erl shell:

```
1> c(rabbit).
Recompiling /home/lbakken/development/rabbitmq/rabbitmq-server/deps/rabbit/src/rabbit.erl
{ok,rabbit}
```

When `+deterministic` is passed to `erlc`, the `compile` data in each
modules' information is missing the source path for the module.

Follow-up to #3442

(cherry picked from commit eae657f)
@michaelklishin michaelklishin added this to the 4.2.0 milestone May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants