forked from qt-creator/qt-creator
Clang: Fix clang-cl environment
The environment depends on vcvars script and with current way of clang-cl initialization we need to call it again when vcvars are updated. Change-Id: I5ccf34861b711c2514203408db62e2a134592721 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -1102,6 +1102,10 @@ void ClangClToolChain::resetMsvcToolChain(const MsvcToolChain *base)
|
||||
m_abi = base->targetAbi();
|
||||
m_vcvarsBat = base->varsBat();
|
||||
setVarsBatArg(base->varsBatArg());
|
||||
|
||||
initEnvModWatcher(Utils::runAsync(envModThreadPool(),
|
||||
&ClangClToolChain::environmentModifications,
|
||||
m_vcvarsBat, base->varsBatArg()));
|
||||
}
|
||||
|
||||
bool ClangClToolChain::operator ==(const ToolChain &other) const
|
||||
|
@@ -97,7 +97,6 @@ protected:
|
||||
LanguageVersion msvcLanguageVersion(const Core::Id &language,
|
||||
const Macros ¯os) const override;
|
||||
|
||||
private:
|
||||
struct GenerateEnvResult
|
||||
{
|
||||
Utils::optional<QString> error;
|
||||
@@ -106,6 +105,8 @@ private:
|
||||
static void environmentModifications(QFutureInterface<GenerateEnvResult> &future,
|
||||
QString vcvarsBat, QString varsBatArg);
|
||||
void initEnvModWatcher(const QFuture<GenerateEnvResult> &future);
|
||||
|
||||
private:
|
||||
void updateEnvironmentModifications(QList<Utils::EnvironmentItem> modifications);
|
||||
|
||||
mutable QList<Utils::EnvironmentItem> m_environmentModifications;
|
||||
|
Reference in New Issue
Block a user