diff options
| author | ruki <[email protected]> | 2021-03-21 12:55:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-21 12:55:10 +0800 |
| commit | efa052bcecd4203dfce0fda26a297f3ce45ed47d (patch) | |
| tree | 6c647dba446e5dcbc1a1bba06991813215c1ac1b /xmake/core/tool/builder.lua | |
| parent | 03b2656fb77fb3339e43bf8871398b0e2f052a80 (diff) | |
improve linker and compiler for package
Diffstat (limited to 'xmake/core/tool/builder.lua')
| -rw-r--r-- | xmake/core/tool/builder.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index 08a6080c7..9b59de413 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -181,6 +181,12 @@ function builder:_add_flags_from_target(flags, target) return end + -- only for target and option + local target_type = target:type() + if target_type ~= "target" and target_type ~= "option" then + return + end + -- init cache self._TARGETFLAGS = self._TARGETFLAGS or {} local cache = self._TARGETFLAGS @@ -195,7 +201,7 @@ function builder:_add_flags_from_target(flags, target) self:_add_flags_from_language(targetflags, target) -- add flags for the target - if target:type() == "target" then + if target_type == "target" then -- add flags from options self:_add_flags_from_targetopts(targetflags, target) |
