diff options
| author | ruki <[email protected]> | 2021-02-25 23:56:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-02-25 23:56:20 +0800 |
| commit | 017aea4a93318a09e0137190ae72302b8257d3b1 (patch) | |
| tree | 1f7ab26a6311d07c9d56c5122ed72bd98ff38216 /xmake/core/tool/builder.lua | |
| parent | 97513c4135f65579dc318de9b629abd8a0e9295c (diff) | |
improve builder and languages
Diffstat (limited to 'xmake/core/tool/builder.lua')
| -rw-r--r-- | xmake/core/tool/builder.lua | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index 04349dbf2..2e503022e 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -275,28 +275,19 @@ function builder:_add_flags_from_language(flags, target, getters) end end , target = function (name) - - -- only for target local results = {} if target:type() == "target" then - -- get flagvalues (public or interface) of all dependent targets (contain packages/options) - table.join2(results, target:get_from_deps(name, {interface = true})) - -- get flagvalues of target with given flagname table.join2(results, target:get(name)) - end - return results - end - , option = function (name) - -- is target? get flagvalues of the attached options and packages - local results = {} - if target:type() == "target" then + -- get flagvalues of the attached options and packages table.join2(results, target:get_from_opts(name)) table.join2(results, target:get_from_pkgs(name)) - -- is option? get flagvalues of option with given flagname + -- get flagvalues (public or interface) of all dependent targets (contain packages/options) + table.join2(results, target:get_from_deps(name, {interface = true})) + elseif target:type() == "option" then table.join2(results, target:get(name)) end |
