提交 79ea5155 编写于 作者: O ohrstrom

7132779: build-infra merge: Enable ccache to work for most developer builds.

Summary: When a build number is not specified, the JRE_RELEASE_VERSION define contains a date and timestamp. Thus ccache cannot cache the object files for longer than a minute since the define is passed to the compilation of all source files. This change passes JRE_RELEASE_VERSION only to vm_version.cpp and adds a function jre_release_version() to Abstract_VM_Version. This allows all other source files to be ccached.
Reviewed-by: ohair, rottenha
Contributed-by: fredrik.ohrstrom@oracle.com
上级 fd79a79f
...@@ -89,9 +89,13 @@ CPPFLAGS = \ ...@@ -89,9 +89,13 @@ CPPFLAGS = \
${BUILD_TARGET} \ ${BUILD_TARGET} \
${BUILD_USER} \ ${BUILD_USER} \
${HS_LIB_ARCH} \ ${HS_LIB_ARCH} \
${JRE_VERSION} \
${VM_DISTRO} ${VM_DISTRO}
# This is VERY important! The version define must only be supplied to vm_version.o
# If not, ccache will not re-use the cache at all, since the version string might contain
# a time and date.
vm_version.o: CPPFLAGS += ${JRE_VERSION}
ifdef DEFAULT_LIBPATH ifdef DEFAULT_LIBPATH
CPPFLAGS += -DDEFAULT_LIBPATH="\"$(DEFAULT_LIBPATH)\"" CPPFLAGS += -DDEFAULT_LIBPATH="\"$(DEFAULT_LIBPATH)\""
endif endif
......
...@@ -95,9 +95,13 @@ CPPFLAGS = \ ...@@ -95,9 +95,13 @@ CPPFLAGS = \
${BUILD_TARGET} \ ${BUILD_TARGET} \
${BUILD_USER} \ ${BUILD_USER} \
${HS_LIB_ARCH} \ ${HS_LIB_ARCH} \
${JRE_VERSION} \
${VM_DISTRO} ${VM_DISTRO}
# This is VERY important! The version define must only be supplied to vm_version.o
# If not, ccache will not re-use the cache at all, since the version string might contain
# a time and date.
vm_version.o: CPPFLAGS += ${JRE_VERSION}
ifndef JAVASE_EMBEDDED ifndef JAVASE_EMBEDDED
CFLAGS += -DINCLUDE_TRACE CFLAGS += -DINCLUDE_TRACE
endif endif
......
...@@ -83,9 +83,13 @@ CPPFLAGS = \ ...@@ -83,9 +83,13 @@ CPPFLAGS = \
${BUILD_TARGET} \ ${BUILD_TARGET} \
${BUILD_USER} \ ${BUILD_USER} \
${HS_LIB_ARCH} \ ${HS_LIB_ARCH} \
${JRE_VERSION} \
${VM_DISTRO} ${VM_DISTRO}
# This is VERY important! The version define must only be supplied to vm_version.o
# If not, ccache will not re-use the cache at all, since the version string might contain
# a time and date.
vm_version.o: CPPFLAGS += ${JRE_VERSION}
# CFLAGS_WARN holds compiler options to suppress/enable warnings. # CFLAGS_WARN holds compiler options to suppress/enable warnings.
CFLAGS += $(CFLAGS_WARN) CFLAGS += $(CFLAGS_WARN)
......
...@@ -165,6 +165,13 @@ const char* Abstract_VM_Version::vm_release() { ...@@ -165,6 +165,13 @@ const char* Abstract_VM_Version::vm_release() {
return VM_RELEASE; return VM_RELEASE;
} }
// NOTE: do *not* use stringStream. this function is called by
// fatal error handlers. if the crash is in native thread,
// stringStream cannot get resource allocated and will SEGV.
const char* Abstract_VM_Version::jre_release_version() {
return JRE_RELEASE_VERSION;
}
#define OS LINUX_ONLY("linux") \ #define OS LINUX_ONLY("linux") \
WINDOWS_ONLY("windows") \ WINDOWS_ONLY("windows") \
SOLARIS_ONLY("solaris") \ SOLARIS_ONLY("solaris") \
......
...@@ -71,6 +71,7 @@ class Abstract_VM_Version: AllStatic { ...@@ -71,6 +71,7 @@ class Abstract_VM_Version: AllStatic {
// Internal version providing additional build information // Internal version providing additional build information
static const char* internal_vm_info_string(); static const char* internal_vm_info_string();
static const char* jre_release_version();
// does HW support an 8-byte compare-exchange operation? // does HW support an 8-byte compare-exchange operation?
static bool supports_cx8() {return _supports_cx8;} static bool supports_cx8() {return _supports_cx8;}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册