From 28b11d0f66df2e2b8b9cd50bb8a2bfe9bb267e26 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Fri, 29 Sep 2023 20:14:44 +0100 Subject: [PATCH] Workaround build errors with VS2019. --- build/llvm/LLVM.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/llvm/LLVM.lua b/build/llvm/LLVM.lua index f375b39e9..df1f5ca00 100644 --- a/build/llvm/LLVM.lua +++ b/build/llvm/LLVM.lua @@ -240,6 +240,12 @@ function cmake(gen, conf, builddir, options) if os.ishost("windows") then options = options .. " -Thost=x64" + + -- Workaround build failure due to bugs in older Windows SDK headers + local vsver = get_vs_version() + if vsver == "vs2019" then + options = options .. ' -DCMAKE_SYSTEM_VERSION=10.0.19041.0' + end end local cmd = cmake .. " -G " .. '"' .. gen .. '"'