public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhiguang Liu" <zhiguang.liu@intel.com>
To: devel@edk2.groups.io
Cc: Liming Gao <liming.gao@intel.com>, Ray Ni <ray.ni@intel.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: [PATCH] edksetup.bat: Simplify the step to use CLANGPDB
Date: Fri, 20 Dec 2019 15:35:12 +0800	[thread overview]
Message-ID: <20191220073512.147180-1-zhiguang.liu@intel.com> (raw)

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\
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 | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/edksetup.bat b/edksetup.bat
index 024f57a4b7..bd057d1241 100755
--- a/edksetup.bat
+++ b/edksetup.bat
@@ -113,6 +113,17 @@ if not defined NASM_PREFIX (
     @if not exist "C:\nasm\nasm.exe" echo   Attempting to build modules that require NASM will fail.
 )
 
+:check_CLANGPDB
+@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 the environment variable to C:\Program Files\LLVM\bin\
+    )
+)
+
 :check_cygwin
 if defined CYGWIN_HOME (
   if not exist "%CYGWIN_HOME%" (
-- 
2.16.2.windows.1


             reply	other threads:[~2019-12-20  7:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20  7:35 Zhiguang Liu [this message]
2019-12-20  7:40 ` [PATCH] edksetup.bat: Simplify the step to use CLANGPDB Ni, Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191220073512.147180-1-zhiguang.liu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox