public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 4/4] PurleyOpenBoardPkg:Extend options in bld.bat to support Binary Cache
@ 2019-05-31  1:41 Fan, ZhijuX
  0 siblings, 0 replies; only message in thread
From: Fan, ZhijuX @ 2019-05-31  1:41 UTC (permalink / raw)
  To: devel@edk2.groups.io
  Cc: Gao, Liming, Feng, Bob C, Shi, Steven, Lu, Shifei A, Zhou, Bowen,
	Oram, Isaac W

[-- Attachment #1: Type: text/plain, Size: 3663 bytes --]

BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1785

Need extend the options in the Kabylake build bld.bat file to
support Binary Cache.

BINARY_CACHE_PATH:
if BINARY_CACHE_PATH is empty, use BinCache as default path

Add "cache-produce" and "cache-consume" to command line,
Used to generate and use Binary Cache files.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Shifei A Lu <shifei.a.lu@intel.com>
Cc: Xiaohu Zhou <bowen.zhou@intel.com>
Cc: Isaac W Oram <isaac.w.oram@intel.com>
---
 Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat      | 21 +++++++++++++++++++--
 Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat |  4 ++--
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
index f624be03a9..f02472239d 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
@@ -10,6 +10,11 @@ REM Run setlocal to take a snapshot of the environment variables.  endlocal is c
 setlocal
 set SCRIPT_ERROR=0
 
+@if not defined BINARY_CACHE_PATH (
+  echo Info: BINARY_CACHE_PATH is empty, use BinCache as default
+  SET BINARY_CACHE_PATH=BinCache
+)
+
 REM ---- Do NOT use :: for comments Inside of code blocks() ----
 
 ::**********************************************************************
@@ -28,6 +33,18 @@ if /I "%1"=="clean" (
   goto :EOF
 )
 
+@if "%~1" == "cache-produce" (
+  SET BINARY_CACHE_CMD_LINE= --hash --binary-destination=%BINARY_CACHE_PATH%
+  shift
+  goto BUILD_FLAGS_LOOP
+)
+
+@if "%~1" == "cache-consume" (
+  SET BINARY_CACHE_CMD_LINE= --hash --binary-source=%BINARY_CACHE_PATH%
+  shift
+  goto BUILD_FLAGS_LOOP
+)
+
 shift
 GOTO :parseCmdLine
 
@@ -86,8 +103,8 @@ echo                          Build Start
 echo.
 echo --------------------------------------------------------------------
 echo.
-echo build %BUILD_CMD_LINE% --log=%BUILD_LOG% %BUILD_REPORT_FLAGS%
-call build %BUILD_CMD_LINE% --log=%BUILD_LOG% %BUILD_REPORT_FLAGS%
+echo build %BUILD_CMD_LINE% --log=%BUILD_LOG% %BUILD_REPORT_FLAGS% %BINARY_CACHE_CMD_LINE%
+call build %BUILD_CMD_LINE% --log=%BUILD_LOG% %BUILD_REPORT_FLAGS% %BINARY_CACHE_CMD_LINE%
 echo --------------------------------------------------------------------
 echo.
 echo                          Build End
diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
index d9c1442ea1..4aba30adce 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
@@ -182,8 +182,8 @@ set PRE_BUILD_CMD_LINE=%BUILD_CMD_LINE% -D MAX_SOCKET=%MAX_SOCKET%
 set PRE_BUILD_LOG=%WORKSPACE%\Build\prebuild.log
 set PRE_BUILD_REPORT=%WORKSPACE%\Build\preBuildReport.txt
 
-echo build %PRE_BUILD_CMD_LINE% -m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --log=%PRE_BUILD_LOG%
-call build %PRE_BUILD_CMD_LINE% -m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --log=%PRE_BUILD_LOG%
+echo build %PRE_BUILD_CMD_LINE% -m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --log=%PRE_BUILD_LOG% %BINARY_CACHE_CMD_LINE%
+call build %PRE_BUILD_CMD_LINE% -m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --log=%PRE_BUILD_LOG% %BINARY_CACHE_CMD_LINE%
 if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
 
 @REM PSYS == FIX0
-- 
2.14.1.windows.1


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 4745 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-31  1:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-31  1:41 [PATCH 4/4] PurleyOpenBoardPkg:Extend options in bld.bat to support Binary Cache Fan, ZhijuX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox