mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-25 17:50:45 +00:00
8241271: Make hotspot build reproducible
Reviewed-by: erikj, stefank, jwilhelm
This commit is contained in:
parent
e04080bd0f
commit
901029355f
@ -95,6 +95,9 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
export HOTSPOT_BUILD_TIME="@HOTSPOT_BUILD_TIME@"
|
||||
export USE_PRECOMPILED_HEADER="@USE_PRECOMPILED_HEADER@"
|
||||
|
||||
# Now locate the main script and run it.
|
||||
REAL_COMPARE_SCRIPT="$TOPDIR/make/scripts/compare.sh"
|
||||
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
|
||||
|
||||
@ -157,6 +157,15 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
|
||||
HOTSPOT_TARGET_CPU_ARCH=zero
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([hotspot-build-time], [AS_HELP_STRING([--with-hotspot-build-time],
|
||||
[timestamp to use in hotspot version string, empty for on-the-fly @<:@empty@:>@])])
|
||||
|
||||
if test "x$with_hotspot_build_time" != x; then
|
||||
HOTSPOT_BUILD_TIME="$with_hotspot_build_time"
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_BUILD_TIME)
|
||||
|
||||
|
||||
# Override hotspot cpu definitions for ARM platforms
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm; then
|
||||
HOTSPOT_TARGET_CPU=arm_32
|
||||
|
||||
@ -156,6 +156,7 @@ IMPORT_MODULES_SRC:=@IMPORT_MODULES_SRC@
|
||||
IMPORT_MODULES_MAKE:=@IMPORT_MODULES_MAKE@
|
||||
|
||||
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
|
||||
HOTSPOT_BUILD_TIME:=@HOTSPOT_BUILD_TIME@
|
||||
|
||||
# Platform naming variables
|
||||
LAUNCHER_NAME:=@LAUNCHER_NAME@
|
||||
|
||||
@ -248,7 +248,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
common.main_profile_base = {
|
||||
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"],
|
||||
default_make_targets: ["product-bundles", "test-bundles", "static-libs-bundles"],
|
||||
configure_args: concat(["--enable-jtreg-failure-handler"],
|
||||
configure_args: concat("--enable-jtreg-failure-handler",
|
||||
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
|
||||
"--disable-manpages",
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
@ -776,6 +776,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
= concat(profiles[cmpBaselineName].default_make_targets, "docs");
|
||||
}
|
||||
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ];
|
||||
profiles[cmpBaselineName].configure_args = concat(
|
||||
profiles[cmpBaselineName].configure_args,
|
||||
"--with-hotspot-build-time=n/a",
|
||||
"--disable-precompiled-headers");
|
||||
// Do not inherit artifact definitions from base profile
|
||||
delete profiles[cmpBaselineName].artifacts;
|
||||
});
|
||||
|
||||
@ -75,6 +75,10 @@ CFLAGS_VM_VERSION := \
|
||||
-DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
|
||||
#
|
||||
|
||||
ifneq ($(HOTSPOT_BUILD_TIME), )
|
||||
CFLAGS_VM_VERSION += -DHOTSPOT_BUILD_TIME='"$(HOTSPOT_BUILD_TIME)"'
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Disabled warnings
|
||||
|
||||
|
||||
@ -36,13 +36,15 @@ fi
|
||||
# Diff exceptions
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ]; then
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./lib/server/libjvm.so
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
if [ "$HOTSPOT_BUILD_TIME" = "" -o "$USE_PRECOMPILED_HEADER" = "true" ]; then
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./lib/server/libjvm.so
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
STRIP_BEFORE_COMPARE="
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
fi
|
||||
elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
|
||||
SKIP_BIN_DIFF="true"
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -273,9 +273,13 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
|
||||
#define FLOAT_ARCH_STR XSTR(FLOAT_ARCH)
|
||||
#endif
|
||||
|
||||
#ifndef HOTSPOT_BUILD_TIME
|
||||
#define HOTSPOT_BUILD_TIME __DATE__ " " __TIME__
|
||||
#endif
|
||||
|
||||
#define INTERNAL_VERSION_SUFFIX VM_RELEASE ")" \
|
||||
" for " OS "-" CPU FLOAT_ARCH_STR \
|
||||
" JRE (" VERSION_STRING "), built on " __DATE__ " " __TIME__ \
|
||||
" JRE (" VERSION_STRING "), built on " HOTSPOT_BUILD_TIME \
|
||||
" by " XSTR(HOTSPOT_BUILD_USER) " with " HOTSPOT_BUILD_COMPILER
|
||||
|
||||
return strcmp(DEBUG_LEVEL, "release") == 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user