make/linux/makefiles/vm.make

Print this page
rev 3024 : 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

*** 93,105 **** ${INCLUDES} \ ${BUILD_VERSION} \ ${BUILD_TARGET} \ ${BUILD_USER} \ ${HS_LIB_ARCH} \ - ${JRE_VERSION} \ ${VM_DISTRO} ifndef JAVASE_EMBEDDED CFLAGS += -DINCLUDE_TRACE endif # CFLAGS_WARN holds compiler options to suppress/enable warnings. --- 93,109 ---- ${INCLUDES} \ ${BUILD_VERSION} \ ${BUILD_TARGET} \ ${BUILD_USER} \ ${HS_LIB_ARCH} \ ${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 CFLAGS += -DINCLUDE_TRACE endif # CFLAGS_WARN holds compiler options to suppress/enable warnings.