From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: steven.shi@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Mon, 17 Jun 2019 18:43:44 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 18:43:43 -0700 X-ExtLoop1: 1 Received: from jshi19-mobl.ccr.corp.intel.com ([10.254.212.155]) by orsmga002.jf.intel.com with ESMTP; 17 Jun 2019 18:43:42 -0700 From: "Steven Shi" To: devel@edk2.groups.io Cc: liming.gao@intel.com, bob.c.feng@intel.com, christian.rodriguez@intel.com Subject: [PATCH] BaseTools:Change build cache option name from --binary- to --cache- Date: Tue, 18 Jun 2019 09:43:32 +0800 Message-Id: <20190618014332.10456-1-steven.shi@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 https://bugzilla.tianocore.org/show_bug.cgi?id=1896 Current build cache is enabled by the below two options: --binary-destination, which is to produce the cache. --binary-source, which is to consume the cache. Since current build cache does not only support to store the binary file (e.g. .efi file) but also support the library and other type files (.lib, .pdb, .inf etc), so the prefix "--binary-" will confuse user with misunderstanding that the build cache will only support binary file. This patch is to change the build cache option prefix name from --binary- to --cache- like below: --cache-destination --cache-source --- BaseTools/Source/Python/build/build.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 2dca3c7b34..bc90a34bf5 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -731,13 +731,13 @@ class Build(): GlobalData.gDisableIncludePathCheck = BuildOptions.DisableIncludePathCheck if GlobalData.gBinCacheDest and not GlobalData.gUseHashCache: - EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--binary-destination must be used together with --hash.") + EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--cache-destination must be used together with --hash.") if GlobalData.gBinCacheSource and not GlobalData.gUseHashCache: - EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--binary-source must be used together with --hash.") + EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--cache-source must be used together with --hash.") if GlobalData.gBinCacheDest and GlobalData.gBinCacheSource: - EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--binary-destination can not be used together with --binary-source.") + EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--cache-destination can not be used together with --cache-source.") if GlobalData.gBinCacheSource: BinCacheSource = os.path.normpath(GlobalData.gBinCacheSource) @@ -746,7 +746,7 @@ class Build(): GlobalData.gBinCacheSource = BinCacheSource else: if GlobalData.gBinCacheSource is not None: - EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --binary-source.") + EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --cache-source.") if GlobalData.gBinCacheDest: BinCacheDest = os.path.normpath(GlobalData.gBinCacheDest) @@ -755,7 +755,7 @@ class Build(): GlobalData.gBinCacheDest = BinCacheDest else: if GlobalData.gBinCacheDest is not None: - EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --binary-destination.") + EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --cache-destination.") if self.ConfDirectory: # Get alternate Conf location, if it is absolute, then just use the absolute directory name @@ -2334,15 +2334,14 @@ def MyOptionParser(): help="Specify the specific option to parse EDK UNI file. Must be one of: [-c, -s]. -c is for EDK framework UNI file, and -s is for EDK UEFI UNI file. "\ "This option can also be specified by setting *_*_*_BUILD_FLAGS in [BuildOptions] section of platform DSC. If they are both specified, this value "\ "will override the setting in [BuildOptions] section of platform DSC.") - Parser.add_option("-N", "--no-cache", action="store_true", dest="DisableCache", default=False, help="Disable build cache mechanism") Parser.add_option("--conf", action="store", type="string", dest="ConfDirectory", help="Specify the customized Conf directory.") Parser.add_option("--check-usage", action="store_true", dest="CheckUsage", default=False, help="Check usage content of entries listed in INF file.") Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files") Parser.add_option("--pcd", action="append", dest="OptionPcd", help="Set PCD value by command line. Format: \"PcdName=Value\" ") Parser.add_option("-l", "--cmd-len", action="store", type="int", dest="CommandLength", help="Specify the maximum line length of build command. Default is 4096.") Parser.add_option("--hash", action="store_true", dest="UseHashCache", default=False, help="Enable hash-based caching during build process.") - Parser.add_option("--binary-destination", action="store", type="string", dest="BinCacheDest", help="Generate a cache of binary files in the specified directory.") - Parser.add_option("--binary-source", action="store", type="string", dest="BinCacheSource", help="Consume a cache of binary files from the specified directory.") + Parser.add_option("--cache-destination", action="store", type="string", dest="BinCacheDest", help="Generate build cache files in the specified directory.") + Parser.add_option("--cache-source", action="store", type="string", dest="BinCacheSource", help="Consume build cache files from the specified directory.") Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=False, help="Enable GenFds multi thread to generate ffs file.") Parser.add_option("--disable-include-path-check", action="store_true", dest="DisableIncludePathCheck", default=False, help="Disable the include path check for outside of package.") (Opt, Args) = Parser.parse_args() -- 2.17.1.windows.2