diff options
| author | ruki <[email protected]> | 2018-11-08 22:51:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-11-08 11:11:44 +0800 |
| commit | da5ba0608b0db673077d30951b7227ed42a69dca (patch) | |
| tree | 8b0968bf8cf6cd33db6704c615fd2c1db18abb7e /xmake/core/tool/builder.lua | |
| parent | a1c8f03dc30ad086a2116458ae58ec6e2eddce1b (diff) | |
add syslinks api
Diffstat (limited to 'xmake/core/tool/builder.lua')
| -rw-r--r-- | xmake/core/tool/builder.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index ac2f5a3b3..5daf18f94 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -141,13 +141,13 @@ function builder:_inherit_from_targetdeps(results, target, flagname) local targetkind = target:get("kind") local depconfig = table.wrap(target:depconfig(dep:name())) if (depkind == "static" or depkind == "shared") and (depconfig.inherit == nil or depconfig.inherit) then - if flagname == "links" and (targetkind == "binary" or targetkind == "shared") then + if (flagname == "links" or flagname == "syslinks") and (targetkind == "binary" or targetkind == "shared") then -- add dependent link table.insert(results, dep:basename()) -- inherit links from the depdent target - self:_inherit_from_target(results, dep, "links") + self:_inherit_from_target(results, dep, flagname) elseif flagname == "linkdirs" and (targetkind == "binary" or targetkind == "shared") then @@ -155,7 +155,7 @@ function builder:_inherit_from_targetdeps(results, target, flagname) table.insert(results, path.directory(dep:targetfile())) -- inherit linkdirs from the depdent target - self:_inherit_from_target(results, dep, "linkdirs") + self:_inherit_from_target(results, dep, flagname) elseif flagname == "rpathdirs" and (targetkind == "binary" or targetkind == "shared") then @@ -293,7 +293,7 @@ function builder:_addflags_from_language(flags, target, getters) if target:type() == "target" then -- link? add includes and links of all dependent targets first - if name == "links" or name == "linkdirs" or name == "rpathdirs" or name == "includedirs" then + if name == "links" or name == "syslinks" or name == "linkdirs" or name == "rpathdirs" or name == "includedirs" then self:_inherit_from_targetdeps(results, target, name) end |
