diff options
| author | ruki <[email protected]> | 2023-08-27 22:11:29 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-08-27 22:11:29 +0800 |
| commit | ea3c9ec7202e0f4dc16339628e1556bbac26bcb0 (patch) | |
| tree | 31861b6de8897d53c20ae8188e273ef56932ca63 /xmake/modules/private/action/require/impl/package.lua | |
| parent | 2c894cb2c8062e6291d0b2fc4dafebef018f8003 (diff) | |
improve the ignored configs for buildhash
Diffstat (limited to 'xmake/modules/private/action/require/impl/package.lua')
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 4a94677b4..77b4abbd0 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -502,8 +502,9 @@ function _init_requireinfo(requireinfo, package, opt) requireinfo.configs.lto = requireinfo.configs.lto or project.policy("build.optimization.lto") end -- but we will ignore some configs for buildhash in the headeronly and host/binary package + -- @note on_test still need these configs, @see https://github.com/xmake-io/xmake/issues/4124 if package:is_headeronly() or (package:is_binary() and not package:is_cross()) then - requireinfo.ignored_configs = {"vs_runtime", "toolchains", "lto", "pic"} + requireinfo.ignored_configs_for_buildhash = {"vs_runtime", "toolchains", "lto", "pic"} end end @@ -1151,9 +1152,9 @@ function get_configs_str(package) if requireinfo.kind then table.insert(configs, requireinfo.kind) end - local ignored_configs = hashset.from(requireinfo.ignored_configs or {}) + local ignored_configs_for_buildhash = hashset.from(requireinfo.ignored_configs_for_buildhash or {}) for k, v in pairs(requireinfo.configs) do - if not ignored_configs:has(k) then + if not ignored_configs_for_buildhash:has(k) then if type(v) == "boolean" then table.insert(configs, k .. ":" .. (v and "y" or "n")) else |
