Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8031487

Do not use __DATE__ and __TIME__ in vm_version.cpp

XMLWordPrintable

      vm_version.cpp includes the "magic" macros __DATE__ and __TIME__ which is generated by the compiler at compile-time. (Or technically, the preprocessor...)

      This means that it is impossible to compile this file twice and get an identical object file. This in turn makes it impossible to create an identical libjvm.so, which in turn makes it impossible to recreate a build in JPRT. (See INTJDK-7608454).

      If the compile date and time is indeed required to store, I recommend setting them as explicit defines when compiling vm_version.cpp, so that they can be overridden.

            Unassigned Unassigned
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: