Skip to content

Commit

Permalink
edksetup.bat: Simplify the step to use CLANGPDB
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Signed-off-by: Zhiguang Liu <[email protected]>
  • Loading branch information
LiuZhiguang001 authored and mergify[bot] committed Jan 7, 2020
1 parent 0ef6fbb commit cc617b6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions edksetup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%" (
Expand Down

0 comments on commit cc617b6

Please sign in to comment.