]> git.proxmox.com Git - mirror_edk2.git/commitdiff
edksetup.bat: Simplify the step to use CLANGPDB
authorLiu, Zhiguang <zhiguang.liu@intel.com>
Fri, 20 Dec 2019 08:32:26 +0000 (16:32 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 7 Jan 2020 00:44:04 +0000 (00:44 +0000)
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

index 024f57a4b739a2e7ce6c065ae56b0fbea3d9adae..7b9377aaa5c2f6eeac2934e3e86d2356ecb7224a 100755 (executable)
@@ -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.\r
 )\r
 \r
+:check_CLANGPDB\r
+@REM In Windows, set CLANG_HOST_BIN=n to use nmake command\r
+@set CLANG_HOST_BIN=n\r
+if not defined CLANG_BIN (\r
+    @echo.\r
+    @echo !!! WARNING !!! CLANG_BIN environment variable is not set\r
+    @if exist "C:\Program Files\LLVM\bin\clang.exe" (\r
+        @set CLANG_BIN=C:\Program Files\LLVM\bin\\r
+        @echo   Found LLVM, setting CLANG_BIN environment variable to C:\Program Files\LLVM\bin\\r
+    )\r
+)\r
+\r
 :check_cygwin\r
 if defined CYGWIN_HOME (\r
   if not exist "%CYGWIN_HOME%" (\r