Skip to content

Commit d815fd1

Browse files
committed
Add RMQ_NON_DETERMINISTIC_BUILD make variable
Follow-up to: * #3442 * 93db480 * #13899 * #14326 Simply changing `+=` to `?=` doesn't work as there are other important statements added to `RMQ_ERLC_OPTS` that can't be left out when `make RMQ_ERLC_OPTS=''` is run. This only became apparent when a completely cleaned-out checkout of `rabbitmq/rabbitmq-server` was attempted to be built with that command. This adds `RMQ_NON_DETERMINISTIC_BUILD` which will be used like this: ``` make RMQ_NON_DETERMINISTIC_BUILD=true ``` ...and `+deterministic` won't be passed to `erlc` or other commands.
1 parent a7827ba commit d815fd1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

deps/rabbit/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ RMQ_ERLC_OPTS += -DTRACE_SUPERVISOR2=true
367367
endif
368368

369369
# https://www.erlang.org/doc/apps/parsetools/leex.html#file/2
370-
YRL_ERLC_OPTS ?= +deterministic
370+
ifeq ($(RMQ_NON_DETERMINISTIC_BUILD),)
371+
YRL_ERLC_OPTS += +deterministic
372+
endif
371373

372374
# --------------------------------------------------------------------
373375
# Documentation.

deps/rabbit_common/mk/rabbitmq-build.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ ifneq ($(filter rabbitmq_cli,$(BUILD_DEPS) $(DEPS)),)
1515
RMQ_ERLC_OPTS += -pa $(DEPS_DIR)/rabbitmq_cli/ebin
1616
endif
1717

18-
RMQ_ERLC_OPTS ?= +deterministic
18+
ifeq ($(RMQ_NON_DETERMINISTIC_BUILD),)
19+
RMQ_ERLC_OPTS += +deterministic
20+
endif
1921

2022
# Push our compilation options to both the normal and test ERLC_OPTS.
2123
ERLC_OPTS += $(RMQ_ERLC_OPTS)

0 commit comments

Comments
 (0)