* [PATCH 3/3 V2] PurleyOpenBoardPkg:Extend options in bld.bat to support Binary Cache
@ 2019-06-17 5:11 Fan, ZhijuX
0 siblings, 0 replies; only message in thread
From: Fan, ZhijuX @ 2019-06-17 5:11 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: 3635 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>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
---
Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat | 17 +++++++++++++++--
Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat | 4 ++--
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
index f624be03a9..4c809426f2 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,14 @@ if /I "%1"=="clean" (
goto :EOF
)
+@if "%~1" == "cache-produce" (
+ SET BINARY_CACHE_CMD_LINE= --hash --binary-destination=%BINARY_CACHE_PATH%
+)
+
+@if "%~1" == "cache-consume" (
+ SET BINARY_CACHE_CMD_LINE= --hash --binary-source=%BINARY_CACHE_PATH%
+)
+
shift
GOTO :parseCmdLine
@@ -86,8 +99,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: 4804 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-17 5:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 5:11 [PATCH 3/3 V2] 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