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

fix requirekey for runtimes #5538 #5567

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
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
25 changes: 12 additions & 13 deletions xmake/modules/private/action/require/impl/package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -587,20 +587,19 @@ function _finish_requireinfo(requireinfo, package)
package:arch_set(requireinfo.arch)
end
requireinfo.configs = requireinfo.configs or {}
if not package:is_headeronly() then
if package:is_plat("windows") then
-- @see https://github.com/xmake-io/xmake/issues/4477#issuecomment-1913249489
local runtimes = requireinfo.configs.runtimes
if runtimes then
runtimes = runtimes:split(",")
else
runtimes = {}
end
if not table.contains(runtimes, "MT", "MD", "MTd", "MDd") then
table.insert(runtimes, "MT")
end
requireinfo.configs.runtimes = table.concat(runtimes, ",")
if package:is_plat("windows") then
-- @see https://github.com/xmake-io/xmake/issues/4477#issuecomment-1913249489
-- @note its buildhash will be ignored for headeronly
local runtimes = requireinfo.configs.runtimes
if runtimes then
runtimes = runtimes:split(",")
else
runtimes = {}
end
if not table.contains(runtimes, "MT", "MD", "MTd", "MDd") then
table.insert(runtimes, "MT")
end
requireinfo.configs.runtimes = table.concat(runtimes, ",")
end
-- we need to ensure readonly configs
for _, name in ipairs(table.keys(requireinfo.configs)) do
Expand Down
Loading