diff options
| author | ruki <[email protected]> | 2018-11-18 21:51:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-11-18 21:51:54 +0800 |
| commit | 746f1742e384d04829f82c909038cc3663366d27 (patch) | |
| tree | 1172ac960f2fe1f3e7df6b882e273409636cef77 | |
| parent | 6cb264f3ce7d71fe3f0d1c21e2b2c4398b6d13a8 (diff) | |
fix linker
| -rw-r--r-- | xmake/core/tool/linker.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index 0a63beeae..ec177aa20 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -77,7 +77,9 @@ function linker:_addflags_from_compiler(flags, target, targetkind) table.join2(flags_of_compiler, instance:get(toolkind .. 'flags') or instance:get(flagkind)) -- attempt to add special lanugage flags first for target kind, e.g. targetkind.gc-ldflags, targetkind.dc-arflags - table.join2(flags_of_compiler, instance:get(targetkind .. '.' .. toolkind .. 'flags') or instance:get(targetkind .. '.' .. flagkind)) + if targetkind then + table.join2(flags_of_compiler, instance:get(targetkind .. '.' .. toolkind .. 'flags') or instance:get(targetkind .. '.' .. flagkind)) + end end end end |
