From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.6715.1576830769125736382 for ; Fri, 20 Dec 2019 00:32:49 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: zhiguang.liu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2019 00:32:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,335,1571727600"; d="scan'208";a="241442087" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.170]) by fmsmga004.fm.intel.com with ESMTP; 20 Dec 2019 00:32:47 -0800 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Liming Gao , Ray Ni , Laszlo Ersek Subject: [Patch V2] edksetup.bat: Simplify the step to use CLANGPDB Date: Fri, 20 Dec 2019 16:32:26 +0800 Message-Id: <20191220083226.130036-1-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 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 Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Zhiguang Liu --- 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