Skip to content

Commit

Permalink
Update LLVM build script for Visual Studio 2022.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Mar 8, 2023
1 parent 7d6decd commit 2bb1177
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build/llvm/LLVM.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ end

function get_vs_version()
local function map_msvc_to_vs_version(major, minor)
if major == "19" and minor >= "20" then return "vs2019"
if major == "22" then return "vs2022"
elseif major == "19" and minor >= "20" then return "vs2019"
elseif major == "19" and minor >= "10" then return "vs2017"
end
end

local function map_msbuild_to_vs_version(major, minor)
if major == "16" then return "vs2019"
if major == "17" then return "vs2022"
elseif major == "16" then return "vs2019"
elseif major == "15" then return "vs2017"
end
end
Expand Down Expand Up @@ -397,7 +399,9 @@ end

function get_cmake_generator()
local vsver = get_vs_version()
if vsver == "vs2019" then
if vsver == "vs2022" then
return "Visual Studio 17 2022", (target_architecture() == "x86") and "-A Win32" or nil
elseif vsver == "vs2019" then
return "Visual Studio 16 2019", (target_architecture() == "x86") and "-A Win32" or nil
elseif vsver == "vs2017" then
return "Visual Studio 15 2017" .. (target_architecture() == "x64" and " Win64" or ""), nil
Expand Down

0 comments on commit 2bb1177

Please sign in to comment.