[Openmp-commits] [openmp] r257833 - Don't use __DATE__ or __TIME__; it breaks release builds (PR26145)

Hans Wennborg via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 14 15:18:24 PST 2016


Author: hans
Date: Thu Jan 14 17:18:20 2016
New Revision: 257833

URL: http://llvm.org/viewvc/llvm-project?rev=257833&view=rev
Log:
Don't use __DATE__ or __TIME__; it breaks release builds (PR26145)

The release builds are configured to be reproducible, so that the
binaries compare equal between bootstrap iterations. The OpenMP
run-time build was failing like this:

runtime/src/kmp_version.c:108:79: error: expansion of date or time macro is not reproducible [-Werror,-Wdate-time]
char const __kmp_version_build_time[]     = KMP_VERSION_PREFIX "build time: " __DATE__ " " __TIME__;

Figuring as the build currently doesn't set LIBOMP_DATE, it's probably
OK to skip setting the build time here too.

Modified:
    openmp/trunk/runtime/src/kmp_version.c

Modified: openmp/trunk/runtime/src/kmp_version.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_version.c?rev=257833&r1=257832&r2=257833&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_version.c (original)
+++ openmp/trunk/runtime/src/kmp_version.c Thu Jan 14 17:18:20 2016
@@ -105,7 +105,7 @@ char const __kmp_version_copyright[]
 char const __kmp_version_lib_ver[]        = KMP_VERSION_PREFIX "version: " stringer( KMP_VERSION_MAJOR ) "." stringer( KMP_VERSION_MINOR ) "." stringer( KMP_VERSION_BUILD );
 char const __kmp_version_lib_type[]       = KMP_VERSION_PREFIX "library type: " KMP_LIB_TYPE;
 char const __kmp_version_link_type[]      = KMP_VERSION_PREFIX "link type: " KMP_LINK_TYPE;
-char const __kmp_version_build_time[]     = KMP_VERSION_PREFIX "build time: " __DATE__ " " __TIME__;
+char const __kmp_version_build_time[]     = KMP_VERSION_PREFIX "build time: " "no_timestamp";
 #if KMP_MIC2
     char const __kmp_version_target_env[] = KMP_VERSION_PREFIX "target environment: MIC2";
 #endif




More information about the Openmp-commits mailing list