From c361f27dcfb9d3f6c924e720e41ec701c4de2720 Mon Sep 17 00:00:00 2001 From: Graham Markall Date: Thu, 14 Mar 2024 13:31:55 +0000 Subject: [PATCH] Document VSINSTALLDIR path WAR --- buildscripts/incremental/build.cmd | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/buildscripts/incremental/build.cmd b/buildscripts/incremental/build.cmd index eead59de6..182cdde8f 100644 --- a/buildscripts/incremental/build.cmd +++ b/buildscripts/incremental/build.cmd @@ -1,6 +1,20 @@ call activate %CONDA_ENV% +@rem LLVM derives the location of diaguids.lib from the build-time environment. +@rem Conda-forge packaging works around this by substituting the build-time +@rem location of Visual Studio with $ENV{VSINSTALLDIR}. In order to ensure that +@rem this environment variable is set appropriately, we activate the Visual +@rem Studio Developer Command Prompt prior to running setup.py +@rem +@rem This workaround is required whilst using LLVM from conda-forge; it may also +@rem be necessary to consider a workaround for our own llvmdev packages. +@rem +@rem For more info, see: +@rem +@rem - https://github.com/conda-forge/llvmdev-feedstock/issues/175 +@rem - https://github.com/conda-forge/llvmdev-feedstock/pull/223 +@rem - https://github.com/MicrosoftDocs/visualstudio-docs/issues/7774 if "%LLVM%"=="15" ( call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" if %errorlevel% neq 0 exit /b %errorlevel%