From: John Wolfe Date: Thu, 10 Mar 2022 19:36:24 +0000 (-0800) Subject: Changes to common header files not directly related to open-vm-tools. X-Git-Tag: stable-12.1.0~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e16f34ac546f5cdf156cc484b29823b84603f76;p=thirdparty%2Fopen-vm-tools.git Changes to common header files not directly related to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_product_versions.h b/open-vm-tools/lib/include/vm_product_versions.h index 43177f551..7bebb4efe 100644 --- a/open-vm-tools/lib/include/vm_product_versions.h +++ b/open-vm-tools/lib/include/vm_product_versions.h @@ -18,6 +18,46 @@ #ifndef VM_PRODUCT_VERSIONS_H #define VM_PRODUCT_VERSIONS_H +/* + * + * This file contains sections delineated by marker tags like MARKER_XXX_... + * These tags are used to generate vm_product_versions_fast.h, which is a + * version header that enables faster compiles. + * + * When BUILD_NUMBER and similar macros are defined as numbers, builds become + * slow as the consumer can't be cached (the crypto-hash for the C compiler's + * inputs changes each build). For cases where that is still necessary, + * vm_product_versions_slow.h can be used. Note: the fast headers require + * linking to bora/lib/version. + * + * to avoid multiple copy of similar header, xx_fast.h code is generated from + * this file using these marker tag. + * + */ + +// vm_product_versions_fast.h can't be used in headers shared with Windows just +// yet +//MARKER_FAST_UNCOMMENT_START +//#if defined _MSC_VER +//#error Fast Version headers not implemented on Windows yet +//#endif +//MARKER_FAST_UNCOMMENT_END + +//MARKER_FAST_UNCOMMENT_START +//extern unsigned int gProductVersion[]; +//extern unsigned int gVieFileVersion[]; +//extern unsigned int gVpxVersionNumeric[]; +//extern unsigned int gNetdumpFileVersion[]; +//extern unsigned int gFoundryFileVersion[]; +// +//extern int gVddkVersionMajor; +//extern int gVddkVersionMinor; +//extern int gVddkVersionMaint; +// +//extern unsigned int gOvftoolFileVersion[]; +//extern const char gEsxReleaseVersionString[]; +//MARKER_FAST_UNCOMMENT_END + /* * NOTE: Some of the macro expansions in this file require information * from the generated file, 'buildNumber.h'. For those @@ -33,6 +73,8 @@ * version. Otherwise we use a hard-coded value for Workstation and a different * hard-coded value for every other product. */ + +//MARKER_FAST_REMOVE_START #if defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ #define PRODUCT_VERSION 12,1,0,PRODUCT_BUILD_NUMBER_NUMERIC /* VMRC_VERSION_NUMBER below has to match this */ #elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ @@ -58,6 +100,10 @@ /* Generic catch-all. */ #define PRODUCT_VERSION 0,0,0,PRODUCT_BUILD_NUMBER_NUMERIC #endif +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#define PRODUCT_VERSION gProductVersion +//MARKER_FAST_UNCOMMENT_END /* * The VIE components are shared by different products and may be updated by newer @@ -83,7 +129,12 @@ * VMI 2.0 : 3.1.0 * P2VA 3.0 : 3.?.? */ +//MARKER_FAST_REMOVE_START #define VIE_FILEVERSION 6,5,0,PRODUCT_BUILD_NUMBER_NUMERIC +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#define VIE_FILEVERSION gVieFileVersion +//MARKER_FAST_UNCOMMENT_END /* * This string can be a little more "free form". The license @@ -152,8 +203,13 @@ // ESX release versioning string - // ..-.. +//MARKER_FAST_REMOVE_START #define ESX_RELEASE_VERSION_STR ESX_VERSION "-" ESX_RELEASE "." \ XSTR(BUILD_NUMBER_NUMERIC) +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#define ESX_RELEASE_VERSION_STR gEsxReleaseVersionString +//MARKER_FAST_UNCOMMENT_END #define WORKSTATION_RELEASE_DESCRIPTION "" #define P2V_VERSION "e.x.p" @@ -224,7 +280,12 @@ #define VPX_VERSION_PATCH "00000" #define VPX_VERSION_THIRD_PARTY VPX_VERSION_MAJOR VPX_VERSION_MINOR \ VPX_VERSION_MAINT +//MARKER_FAST_REMOVE_START #define VPX_VERSION_NUMERIC 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#define VPX_VERSION_NUMERIC gVpxVersionNumeric +//MARKER_FAST_UNCOMMENT_END // Last supported ESX version by VC. #define VPX_MIN_HOST_VERSION "6.7.0" @@ -260,23 +321,50 @@ #define SSO_VERSION "1.0.0" #define SDK_VERSION "4.1.0" #define FOUNDRY_VERSION "1.17.0" + +//MARKER_FAST_REMOVE_START #define FOUNDRY_FILE_VERSION 1,17,0,PRODUCT_BUILD_NUMBER_NUMERIC +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#define FOUNDRY_FILE_VERSION gFoundryFileVersion +//MARKER_FAST_UNCOMMENT_END + #define VLICENSE_VERSION "1.1.5" #define DDK_VERSION "e.x.p" #define VIPERL_VERSION "7.0.0" #define RCLI_VERSION "7.0.0" #define VDM_VERSION "e.x.p" #define NETDUMP_VERSION "5.1.0" + +//MARKER_FAST_REMOVE_START #define NETDUMP_FILE_VERSION 5,1,0,PRODUCT_BUILD_NUMBER_NUMERIC +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#define NETDUMP_FILE_VERSION gNetdumpFileVersion +//MARKER_FAST_UNCOMMENT_END + #define VDDK_VERSION "8.0.0" #define VDDK_VERSION_MAJOR 8 #define VDDK_VERSION_MINOR 0 #define VDDK_VERSION_MAINT 0 + +//MARKER_FAST_REMOVE_START #define VDDK_FILE_VERSION VDDK_VERSION_MAJOR,VDDK_VERSION_MINOR,\ VDDK_VERSION_MAINT,PRODUCT_BUILD_NUMBER_NUMERIC +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#define VDDK_FILE_VERSION gVddkFileVersion +//MARKER_FAST_UNCOMMENT_END + #define OVFTOOL_VERSION "4.5.0" #define VCSA_INSTALLER_VERSION "1.0.0" + +//MARKER_FAST_REMOVE_START #define OVFTOOL_FILE_VERSION 4,5,0,PRODUCT_BUILD_NUMBER_NUMERIC +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#define OVFTOOL_FILE_VERSION gOvftoolFileVersion +//MARKER_FAST_UNCOMMENT_END #define VGAUTH_VERSION "1.0.0" #define COMMON_AGENT_VERSION "e.x.p" @@ -395,7 +483,13 @@ * not needed in the string. */ +//MARKER_FAST_REMOVE_START #define PRODUCT_VERSION_STRING PRODUCT_VERSION_NUMBER " " BUILD_NUMBER +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//extern const char gProductVersionString[]; +//#define PRODUCT_VERSION_STRING gProductVersionString +//MARKER_FAST_UNCOMMENT_END /* * The license manager requires that PRODUCT_VERSION_STRING matches the * following pattern: [.][.]. diff --git a/open-vm-tools/lib/include/vm_version.h b/open-vm-tools/lib/include/vm_version.h index 938abfc90..d4a396a3a 100644 --- a/open-vm-tools/lib/include/vm_version.h +++ b/open-vm-tools/lib/include/vm_version.h @@ -21,9 +21,36 @@ * stored in 'buildNumber.h' is needed. */ +/* + * + * This file contain some of the code wrapped around marker tag like + * MARKER_XXX_START / MARKER_XXX_END + * + * code section wrapped around these marker tag are getting processed in + * bora/scons/modules/buildnum.sc to generate xx_fast.h header. these generated + * header which is free from MACROS e.g. BUILD_NUMBER + * + * These MACROS are changing with every build and causing the file content + * change. Eventually with every build the hash code of these headers and + * source file including these headers changed. Due to this reason file are not + * cacheable by build (both SCons/Bazel) and end up building them again and + * again in place of downloading their build artifact from cache. + * + * to avoid multiple copy of similar header, xx_fast.h code is generated from + * this file using these marker tag. + * + */ + #ifndef VM_VERSION_H #define VM_VERSION_H +// vm_version_fast.h can't be used in headers shared with Windows just yet +//MARKER_FAST_UNCOMMENT_START +//#if defined _MSC_VER +//#error Fast Version headers not implemented on Windows yet +//#endif +//MARKER_FAST_UNCOMMENT_END + #define INCLUDE_ALLOW_USERLEVEL #define INCLUDE_ALLOW_MODULE @@ -33,9 +60,11 @@ #define INCLUDE_ALLOW_VMCORE #include "includeCheck.h" #include "vm_product.h" +//MARKER_FAST_REMOVE_START #if defined(VMX86_TOOLS) || defined(VMX86_SYSIMAGE) #include "vm_tools_version.h" #endif +//MARKER_FAST_REMOVE_END #include "vm_vmx_type.h" #include "vm_compilation_options.h" @@ -44,16 +73,29 @@ * the build number defined by the BUILD_NUMBER and PRODUCT_BUILD_NUMBER * variables at the beginning of every build. */ +//MARKER_FAST_REMOVE_START #include "buildNumber.h" - +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#include "buildNumberFast.h" +//MARKER_FAST_UNCOMMENT_END /* * This is used so we can identify the build and release type * in any generated core files. */ +//MARKER_FAST_UNCOMMENT_START +//#define BUILD_VERSION gBuildVersion +//MARKER_FAST_UNCOMMENT_END +//MARKER_FAST_REMOVE_START #define BUILD_VERSION COMPILATION_OPTION BUILD_NUMBER +//MARKER_FAST_REMOVE_END - +//MARKER_FAST_REMOVE_START #include "vm_product_versions.h" +//MARKER_FAST_REMOVE_END +//MARKER_FAST_UNCOMMENT_START +//#include "vm_product_versions_fast.h" +//MARKER_FAST_UNCOMMENT_END #endif /* VM_VERSION_H */