vm/master.hpp: optional reproducible VM compilation
The old behaviour of building with `__DATE__` and `__TIME__` is still the default, but now it's possible to use `-DREPRODUCIBLE=1` and the `REPRODUCIBLE=1` parameter to `make` and `nmake`. Specifically, this replaces the value of `FACTOR_COMPILE_TIME` with the string constant `"[reproducible]"`. This is purely a cosmetic change.windows-drag
parent
29da71e2bf
commit
044f7bbe11
|
@ -1,6 +1,7 @@
|
||||||
ifdef CONFIG
|
ifdef CONFIG
|
||||||
VERSION = 0.99
|
VERSION = 0.99
|
||||||
GIT_LABEL = $(shell echo `git describe --all`-`git rev-parse HEAD`)
|
GIT_LABEL = $(shell echo `git describe --all`-`git rev-parse HEAD`)
|
||||||
|
REPRODUCIBLE ?= 0
|
||||||
|
|
||||||
BUNDLE = Factor.app
|
BUNDLE = Factor.app
|
||||||
|
|
||||||
|
@ -10,6 +11,7 @@ ifdef CONFIG
|
||||||
-pedantic \
|
-pedantic \
|
||||||
-DFACTOR_VERSION="$(VERSION)" \
|
-DFACTOR_VERSION="$(VERSION)" \
|
||||||
-DFACTOR_GIT_LABEL="$(GIT_LABEL)" \
|
-DFACTOR_GIT_LABEL="$(GIT_LABEL)" \
|
||||||
|
-DFACTOR_REPRODUCIBLE="$(REPRODUCIBLE)" \
|
||||||
$(SITE_CFLAGS)
|
$(SITE_CFLAGS)
|
||||||
|
|
||||||
CXXFLAGS += -std=c++11
|
CXXFLAGS += -std=c++11
|
||||||
|
|
|
@ -65,6 +65,10 @@ LINK_FLAGS = $(LINK_FLAGS) /DEBUG
|
||||||
CL_FLAGS = $(CL_FLAGS) /Zi /DFACTOR_DEBUG
|
CL_FLAGS = $(CL_FLAGS) /Zi /DFACTOR_DEBUG
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IF DEFINED(REPRODUCIBLE)
|
||||||
|
CL_FLAGS = $(CL_FLAGS) /DFACTOR_REPRODUCIBLE=1
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
ML_FLAGS = /nologo /safeseh
|
ML_FLAGS = /nologo /safeseh
|
||||||
|
|
||||||
EXE_OBJS = vm\main-windows.obj vm\factor.res
|
EXE_OBJS = vm\main-windows.obj vm\factor.res
|
||||||
|
|
|
@ -52,8 +52,13 @@
|
||||||
#define FACTOR_COMPILER_VERSION "unknown"
|
#define FACTOR_COMPILER_VERSION "unknown"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (FACTOR_REPRODUCIBLE == 1)
|
||||||
|
#pragma message "REPRODUCIBLE"
|
||||||
|
#define FACTOR_COMPILE_TIME "[reproducible]"
|
||||||
|
#else
|
||||||
// Record compilation time
|
// Record compilation time
|
||||||
#define FACTOR_COMPILE_TIME __DATE__ " " __TIME__
|
#define FACTOR_COMPILE_TIME __DATE__ " " __TIME__
|
||||||
|
#endif
|
||||||
|
|
||||||
// Detect target CPU type
|
// Detect target CPU type
|
||||||
#if defined(__arm__)
|
#if defined(__arm__)
|
||||||
|
|
Loading…
Reference in New Issue