+ GlobalData.gUseHashCache = BuildOptions.UseHashCache\r
+ GlobalData.gBinCacheDest = BuildOptions.BinCacheDest\r
+ GlobalData.gBinCacheSource = BuildOptions.BinCacheSource\r
+ GlobalData.gEnableGenfdsMultiThread = BuildOptions.GenfdsMultiThread\r
+\r
+ if GlobalData.gBinCacheDest and not GlobalData.gUseHashCache:\r
+ EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--binary-destination must be used together with --hash.")\r
+\r
+ if GlobalData.gBinCacheSource and not GlobalData.gUseHashCache:\r
+ EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--binary-source must be used together with --hash.")\r
+\r
+ if GlobalData.gBinCacheDest and GlobalData.gBinCacheSource:\r
+ EdkLogger.error("build", OPTION_NOT_SUPPORTED, ExtraData="--binary-destination can not be used together with --binary-source.")\r
+\r
+ if GlobalData.gBinCacheSource:\r
+ BinCacheSource = os.path.normpath(GlobalData.gBinCacheSource)\r
+ if not os.path.isabs(BinCacheSource):\r
+ BinCacheSource = mws.join(self.WorkspaceDir, BinCacheSource)\r
+ GlobalData.gBinCacheSource = BinCacheSource\r
+ else:\r
+ if GlobalData.gBinCacheSource is not None:\r
+ EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --binary-source.")\r
+\r
+ if GlobalData.gBinCacheDest:\r
+ BinCacheDest = os.path.normpath(GlobalData.gBinCacheDest)\r
+ if not os.path.isabs(BinCacheDest):\r
+ BinCacheDest = mws.join(self.WorkspaceDir, BinCacheDest)\r
+ GlobalData.gBinCacheDest = BinCacheDest\r
+ else:\r
+ if GlobalData.gBinCacheDest is not None:\r
+ EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --binary-destination.")\r