diff options
author | Liu, Zhiguang <zhiguang.liu@intel.com> | 2019-12-20 16:32:26 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-01-07 00:44:04 +0000 |
commit | cc617b6e1430242f8d042c71c2d923dbc6436a36 (patch) | |
tree | e6a1bafeb399bece66e716309874373ecd7ab4a4 /edksetup.bat | |
parent | 0ef6fbbd114e89b8d838eade39bc3a6d7ec54c3c (diff) | |
download | edk2-cc617b6e1430242f8d042c71c2d923dbc6436a36.zip edk2-cc617b6e1430242f8d042c71c2d923dbc6436a36.tar.gz edk2-cc617b6e1430242f8d042c71c2d923dbc6436a36.tar.bz2 |
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>
Diffstat (limited to 'edksetup.bat')
-rwxr-xr-x | edksetup.bat | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/edksetup.bat b/edksetup.bat index 024f57a..7b9377a 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%" (
|