diff options
| -rw-r--r-- | xmake/actions/build/kinds/binary.lua | 14 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/shared.lua | 14 | ||||
| -rw-r--r-- | xmake/actions/build/kinds/static.lua | 14 |
3 files changed, 24 insertions, 18 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index d9b451cc0..092731449 100644 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -137,16 +137,18 @@ function build(target, buildinfo) local sourcekind = nil local sourcebatch = nil for kind, batch in pairs(target:sourcebatches()) do - sourcekind = kind - sourcebatch = batch - kindcount = kindcount + 1 - if kindcount > 1 then - break + if not batch.rulename then + sourcekind = kind + sourcebatch = batch + kindcount = kindcount + 1 + if kindcount > 1 then + break + end end end -- build target - if kindcount == 1 and sourcekind and not sourcekind:startswith("__rule_") and compiler.buildmode(sourcekind, "binary:sources", {target = target}) then + if kindcount == 1 and compiler.buildmode(sourcekind, "binary:sources", {target = target}) then _build_from_sources(target, buildinfo, sourcebatch, sourcekind) else _build_from_objects(target, buildinfo) diff --git a/xmake/actions/build/kinds/shared.lua b/xmake/actions/build/kinds/shared.lua index 9d04589b7..6e9140d13 100644 --- a/xmake/actions/build/kinds/shared.lua +++ b/xmake/actions/build/kinds/shared.lua @@ -150,16 +150,18 @@ function build(target, buildinfo) local sourcekind = nil local sourcebatch = nil for kind, batch in pairs(target:sourcebatches()) do - sourcekind = kind - sourcebatch = batch - kindcount = kindcount + 1 - if kindcount > 1 then - break + if not batch.rulename then + sourcekind = kind + sourcebatch = batch + kindcount = kindcount + 1 + if kindcount > 1 then + break + end end end -- build target - if kindcount == 1 and sourcekind and not sourcekind:startswith("__rule_") and compiler.buildmode(sourcekind, "shared:sources", {target = target}) then + if kindcount == 1 and compiler.buildmode(sourcekind, "shared:sources", {target = target}) then _build_from_sources(target, buildinfo, sourcebatch, sourcekind) else _build_from_objects(target, buildinfo) diff --git a/xmake/actions/build/kinds/static.lua b/xmake/actions/build/kinds/static.lua index 35ee41276..e50be8b78 100644 --- a/xmake/actions/build/kinds/static.lua +++ b/xmake/actions/build/kinds/static.lua @@ -145,16 +145,18 @@ function build(target, buildinfo) local sourcekind = nil local sourcebatch = nil for kind, batch in pairs(target:sourcebatches()) do - sourcekind = kind - sourcebatch = batch - kindcount = kindcount + 1 - if kindcount > 1 then - break + if not batch.rulename then + sourcekind = kind + sourcebatch = batch + kindcount = kindcount + 1 + if kindcount > 1 then + break + end end end -- build target - if kindcount == 1 and sourcekind and not sourcekind:startswith("__rule_") and compiler.buildmode(sourcekind, "static:sources", {target = target}) then + if kindcount == 1 and compiler.buildmode(sourcekind, "static:sources", {target = target}) then _build_from_sources(target, buildinfo, sourcebatch, sourcekind) else _build_from_objects(target, buildinfo) |
