Skip to content

Commit b8a16a4

Browse files
committed
Update LLVM build script for Visual Studio 2022.
1 parent 7d6decd commit b8a16a4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build/llvm/LLVM.lua

+7-3
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ end
5353

5454
function get_vs_version()
5555
local function map_msvc_to_vs_version(major, minor)
56-
if major == "19" and minor >= "20" then return "vs2019"
56+
if major == "19" and minor >= "30" then return "vs2022"
57+
elseif major == "19" and minor >= "20" then return "vs2019"
5758
elseif major == "19" and minor >= "10" then return "vs2017"
5859
end
5960
end
6061

6162
local function map_msbuild_to_vs_version(major, minor)
62-
if major == "16" then return "vs2019"
63+
if major == "17" then return "vs2022"
64+
elseif major == "16" then return "vs2019"
6365
elseif major == "15" then return "vs2017"
6466
end
6567
end
@@ -397,7 +399,9 @@ end
397399

398400
function get_cmake_generator()
399401
local vsver = get_vs_version()
400-
if vsver == "vs2019" then
402+
if vsver == "vs2022" then
403+
return "Visual Studio 17 2022", (target_architecture() == "x86") and "-A Win32" or nil
404+
elseif vsver == "vs2019" then
401405
return "Visual Studio 16 2019", (target_architecture() == "x86") and "-A Win32" or nil
402406
elseif vsver == "vs2017" then
403407
return "Visual Studio 15 2017" .. (target_architecture() == "x64" and " Win64" or ""), nil

0 commit comments

Comments
 (0)