[edk2-devel] [Patch V2] edksetup.bat: Simplify the step to use CLANGPDB

Zhiguang Liu posted 1 patch 4 years, 4 months ago
Failed in applying to current master (apply log)
edksetup.bat | 12 ++++++++++++
1 file changed, 12 insertions(+)
[edk2-devel] [Patch V2] edksetup.bat: Simplify the step to use CLANGPDB
Posted by Zhiguang Liu 4 years, 4 months ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2404

Set the below two environment variables in edksetup.bat:
  set CLANG_HOST_BIN=n
  set CLANG_BIN=C:\Program Files\LLVM\bin\
In Windows, set CLANG_HOST_BIN=n to use nmake command
The CLANG_BIN is only be set if it is not defined.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 edksetup.bat | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/edksetup.bat b/edksetup.bat
index 024f57a4b7..7b9377aaa5 100755
--- a/edksetup.bat
+++ b/edksetup.bat
@@ -113,6 +113,18 @@ if not defined NASM_PREFIX (
     @if not exist "C:\nasm\nasm.exe" echo   Attempting to build modules that require NASM will fail.
 )
 
+:check_CLANGPDB
+@REM In Windows, set CLANG_HOST_BIN=n to use nmake command
+@set CLANG_HOST_BIN=n
+if not defined CLANG_BIN (
+    @echo.
+    @echo !!! WARNING !!! CLANG_BIN environment variable is not set
+    @if exist "C:\Program Files\LLVM\bin\clang.exe" (
+        @set CLANG_BIN=C:\Program Files\LLVM\bin\
+        @echo   Found LLVM, setting CLANG_BIN environment variable to C:\Program Files\LLVM\bin\
+    )
+)
+
 :check_cygwin
 if defined CYGWIN_HOME (
   if not exist "%CYGWIN_HOME%" (
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#52455): https://edk2.groups.io/g/devel/message/52455
Mute This Topic: https://groups.io/mt/68846551/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch V2] edksetup.bat: Simplify the step to use CLANGPDB
Posted by Ni, Ray 4 years, 4 months ago
Reviewed-by:Ray Ni <ray.ni@intel.com>

-- 
Thanks,
Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#52456): https://edk2.groups.io/g/devel/message/52456
Mute This Topic: https://groups.io/mt/68846551/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch V2] edksetup.bat: Simplify the step to use CLANGPDB
Posted by Liming Gao 4 years, 3 months ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: Liu, Zhiguang <zhiguang.liu@intel.com> 
Sent: 2019年12月20日 16:32
To: devel@edk2.groups.io
Cc: Gao, Liming <liming.gao@intel.com>; Ni, Ray <ray.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>
Subject: [Patch V2] edksetup.bat: Simplify the step to use CLANGPDB

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2404

Set the below two environment variables in edksetup.bat:
  set CLANG_HOST_BIN=n
  set CLANG_BIN=C:\Program Files\LLVM\bin\ In Windows, set CLANG_HOST_BIN=n to use nmake command The CLANG_BIN is only be set if it is not defined.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 edksetup.bat | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/edksetup.bat b/edksetup.bat index 024f57a4b7..7b9377aaa5 100755
--- a/edksetup.bat
+++ b/edksetup.bat
@@ -113,6 +113,18 @@ if not defined NASM_PREFIX (
     @if not exist "C:\nasm\nasm.exe" echo   Attempting to build modules that require NASM will fail.
 )
 
+:check_CLANGPDB
+@REM In Windows, set CLANG_HOST_BIN=n to use nmake command @set 
+CLANG_HOST_BIN=n if not defined CLANG_BIN (
+    @echo.
+    @echo !!! WARNING !!! CLANG_BIN environment variable is not set
+    @if exist "C:\Program Files\LLVM\bin\clang.exe" (
+        @set CLANG_BIN=C:\Program Files\LLVM\bin\
+        @echo   Found LLVM, setting CLANG_BIN environment variable to C:\Program Files\LLVM\bin\
+    )
+)
+
 :check_cygwin
 if defined CYGWIN_HOME (
   if not exist "%CYGWIN_HOME%" (
--
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#52879): https://edk2.groups.io/g/devel/message/52879
Mute This Topic: https://groups.io/mt/68846551/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-