summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-08-04 23:22:32 +0800
committerruki <[email protected]>2024-08-04 23:22:32 +0800
commit93951588a6e1b04236262b4bdaceab07a695ea7e (patch)
treefcf979e239fa5c25462376f0dc35845001749a67
parentcc2a7d08129c785ec0344bf76f504b75510c9413 (diff)
improve check package
-rw-r--r--xmake/core/package/package.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index b1da1c19e..65af6cc6e 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -2359,7 +2359,7 @@ function _instance:_generate_build_configs(configs, opt)
if not linker then
os.raise(errors)
end
- local fake_target = {is_shared = function(_) return false end,
+ local fake_target = {is_shared = function(_) return false end,
sourcekinds = function(_) return sourcekind end}
local compiler = self:compiler(sourcekind)
local cxflags = compiler:map_flags("runtime", runtimes, {target = fake_target})
@@ -2412,7 +2412,8 @@ function _instance:_generate_build_configs(configs, opt)
end
-- check links for library
- if self:is_library() and not self:is_headeronly() and not self:is_moduleonly() then
+ if self:is_library() and not self:is_headeronly() and not self:is_moduleonly()
+ and self:exists() then -- we need to skip it if it's in on_check, @see https://github.com/xmake-io/xmake-repo/pull/4834
local links = table.wrap(configs.links)
local ldflags = table.wrap(configs.ldflags)
local frameworks = table.wrap(configs.frameworks)