llvm.org GIT mirror llvm / dd464df
Add new configure option, --disable-timestamps, intended to turn off anything which would mess up binary/object comparisons. Currently: - Disables 'Built on ...' in 'foo --version'. - Disables timestamps from being embedded into .dir files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103423 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 9 years ago
6 changed file(s) with 62 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
269269 # Use -fvisibility-inlines-hidden?
270270 ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@
271271
272 # Do we want to allow timestamping information into builds?
273 ENABLE_TIMESTAMPS := @ENABLE_TIMESTAMPS@
274
272275 # This option tells the Makefiles to produce verbose output.
273276 # It essentially prints the commands that make is executing
274277 #VERBOSE = 1
444444 CXX.Flags += -mdynamic-no-pic
445445 C.Flags += -mdynamic-no-pic
446446 endif
447 endif
448
449 # Support makefile variable to disable any kind of timestamp/non-deterministic
450 # info from being used in the build.
451 ifeq ($(ENABLE_TIMESTAMPS),1)
452 DOTDIR_TIMESTAMP_COMMAND := $(DATE)
453 else
454 DOTDIR_TIMESTAMP_COMMAND := echo 'Created.'
447455 endif
448456
449457 ifeq ($(HOST_OS),MingW)
778786 # To create other directories, as needed, and timestamp their creation
779787 %/.dir:
780788 $(Verb) $(MKDIR) $* > /dev/null
781 $(Verb) $(DATE) > $@
789 $(Verb) $(DOTDIR_TIMESTAMP_COMMAND) > $@
782790
783791 .PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
784792 .PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
523523 default) AC_SUBST(ENABLE_SHARED,[0]) ;;
524524 *) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;;
525525 esac
526
527 dnl Enable embedding timestamp information into build.
528 AC_ARG_ENABLE(timestamps,
529 AS_HELP_STRING([--enable-timestamps],
530 [Enable embedding timestamp information in build (default is YES)]),,
531 enableval=default)
532 case "$enableval" in
533 yes) AC_SUBST(ENABLE_TIMESTAMPS,[1]) ;;
534 no) AC_SUBST(ENABLE_TIMESTAMPS,[0]) ;;
535 default) AC_SUBST(ENABLE_TIMESTAMPS,[1]) ;;
536 *) AC_MSG_ERROR([Invalid setting for --enable-timestamps. Use "yes" or "no"]) ;;
537 esac
538 AC_DEFINE_UNQUOTED([ENABLE_TIMESTAMPS],$ENABLE_TIMESTAMPS,
539 [Define if timestamp information (e.g., __DATE___) is allowed])
526540
527541 dnl Allow specific targets to be specified for building (or not)
528542 TARGETS_TO_BUILD=""
689689 ENABLE_THREADS
690690 ENABLE_PIC
691691 ENABLE_SHARED
692 ENABLE_TIMESTAMPS
692693 TARGETS_TO_BUILD
693694 LLVM_ENUM_TARGETS
694695 LLVM_ENUM_ASM_PRINTERS
14091410 is YES)
14101411 --enable-shared Build a shared library and link tools against it
14111412 (default is NO)
1413 --enable-timestamps Enable embedding timestamp information in build
1414 (default is YES)
14121415 --enable-targets Build specific host targets: all or
14131416 target1,target2,... Valid targets are: host, x86,
14141417 x86_64, sparc, powerpc, alpha, arm, mips, spu,
49224925 { (exit 1); exit 1; }; } ;;
49234926 esac
49244927
4928 # Check whether --enable-timestamps was given.
4929 if test "${enable_timestamps+set}" = set; then
4930 enableval=$enable_timestamps;
4931 else
4932 enableval=default
4933 fi
4934
4935 case "$enableval" in
4936 yes) ENABLE_TIMESTAMPS=1
4937 ;;
4938 no) ENABLE_TIMESTAMPS=0
4939 ;;
4940 default) ENABLE_TIMESTAMPS=1
4941 ;;
4942 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-timestamps. Use \"yes\" or \"no\"" >&5
4943 echo "$as_me: error: Invalid setting for --enable-timestamps. Use \"yes\" or \"no\"" >&2;}
4944 { (exit 1); exit 1; }; } ;;
4945 esac
4946
4947 cat >>confdefs.h <<_ACEOF
4948 #define ENABLE_TIMESTAMPS $ENABLE_TIMESTAMPS
4949 _ACEOF
4950
4951
49254952 TARGETS_TO_BUILD=""
49264953 # Check whether --enable-targets was given.
49274954 if test "${enable_targets+set}" = set; then
1135611383 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1135711384 lt_status=$lt_dlunknown
1135811385 cat > conftest.$ac_ext <
11359 #line 11360 "configure"
11386 #line 11387 "configure"
1136011387 #include "confdefs.h"
1136111388
1136211389 #if HAVE_DLFCN_H
2116621193 ENABLE_THREADS!$ENABLE_THREADS$ac_delim
2116721194 ENABLE_PIC!$ENABLE_PIC$ac_delim
2116821195 ENABLE_SHARED!$ENABLE_SHARED$ac_delim
21196 ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
2116921197 TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
2117021198 LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim
2117121199 LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim
2117421202 ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim
2117521203 CLANGPATH!$CLANGPATH$ac_delim
2117621204 CLANGXXPATH!$CLANGXXPATH$ac_delim
21177 ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim
2117821205 _ACEOF
2117921206
2118021207 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2121621243 ac_delim='%!_!# '
2121721244 for ac_last_try in false false false false false :; do
2121821245 cat >conf$$subs.sed <<_ACEOF
21246 ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim
2121921247 OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim
2122021248 EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim
2122121249 BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim
2131221340 LTLIBOBJS!$LTLIBOBJS$ac_delim
2131321341 _ACEOF
2131421342
21315 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then
21343 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then
2131621344 break
2131721345 elif $ac_last_try; then
2131821346 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
2222
2323 /* Define if threads enabled */
2424 #undef ENABLE_THREADS
25
26 /* Define if timestamp information (e.g., __DATE___) is allowed */
27 #undef ENABLE_TIMESTAMPS
2528
2629 /* Define to 1 if you have the `argz_append' function. */
2730 #undef HAVE_ARGZ_APPEND
11691169 std::string CPU = sys::getHostCPUName();
11701170 if (CPU == "generic") CPU = "(unknown)";
11711171 OS << ".\n"
1172 #if (ENABLE_TIMESTAMPS == 1)
11721173 << " Built " << __DATE__ << " (" << __TIME__ << ").\n"
1174 #endif
11731175 << " Host: " << sys::getHostTriple() << '\n'
11741176 << " Host CPU: " << CPU << '\n'
11751177 << '\n'