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

Use fixed timestamp as an alternative of __DATE__ macro in jdk.jdi to make Windows build reproducible

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 8, 11, 13, 15, 17, 18, 19
    • core-svc
    • Microsoft Windows 10 Pro 10.0.19044 Build 19044

      Microsoft Visual Studio Community 2019 Version 16.11.14

    • b26
    • x86
    • windows

      Building of jdk-11 with

      bash ./configure --with-boot-jdk=../boot-jdk/jdk-11 --with-hotspot-build-time="2022-06-7 10:57am" --with-extra-cflags="/experimental:deterministic" --with-extra-cxxflags="/experimental:deterministic"

      causes the following errors

      * For target support_native_jdk.jdi_libdt_shmem_shmemBase.obj:
      shmemBase.c
      ./src/jdk.jdi/share/native/libdt_shmem/shmemBase.c(1051): error C2220: the following warning is treated as an error
      ./src/jdk.jdi/share/native/libdt_shmem/shmemBase.c(1051): warning C5048: Use of macro '__DATE__' may result in non-deterministic output
      ./src/jdk.jdi/share/native/libdt_shmem/shmemBase.c(1051): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings

      The problem stays actual in the upstream in the case of debug builds

            apavlyutkin Alexey Pavlyutkin
            apavlyutkin Alexey Pavlyutkin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: