Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARM target support for Windows in clang-cl toolchain #5998

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions xmake/toolchains/clang-cl/load.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,27 @@ function main(toolchain)
end
end

local march
local target
if toolchain:is_arch("x86_64", "x64") then
target = "x86_64-pc"
march = "-m64"
ifarbod marked this conversation as resolved.
Show resolved Hide resolved
elseif toolchain:is_arch("i386", "x86") then
elseif toolchain:is_arch("i386", "x86", "i686") then
target = "i686-pc"
march = "-m32"
ifarbod marked this conversation as resolved.
Show resolved Hide resolved
elseif toolchain:is_arch("arm64", "aarch64") then
target = "aarch64"
elseif toolchain:is_arch("arm64ec") then
target = "arm64ec"
elseif toolchain:is_arch("arm") then
target = "armv7"
end
if march then
toolchain:add("cxflags", march)
toolchain:add("mxflags", march)
toolchain:add("asflags", march)

target = target .. "-windows-msvc"

ifarbod marked this conversation as resolved.
Show resolved Hide resolved
if target then
toolchain:add("cxflags", "--target=" .. target)
toolchain:add("mxflags", "--target=" .. target)
toolchain:add("asflags", "--target=" .. target)
end
end

Loading