diff options
| author | ruki <[email protected]> | 2016-05-03 10:55:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-05-03 10:55:30 +0800 |
| commit | 88a2559edce1b44dfa3786478508ee076df231ba (patch) | |
| tree | 63ec1babe83b5886fbcd0ffa2bd3977a99849de2 | |
| parent | 2bc9ded0e299f0b28869a105b15d72c71261d6e7 (diff) | |
fix swift link bug
| -rw-r--r-- | xmake/tools/swiftc.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/xmake/tools/swiftc.lua b/xmake/tools/swiftc.lua index 2cfc94cc0..b635db6eb 100644 --- a/xmake/tools/swiftc.lua +++ b/xmake/tools/swiftc.lua @@ -56,17 +56,19 @@ function init(shellname) , ["-fsanitize=address"] = "" } - -- init ldflags - local swift_linkdirs = config.get("__swift_linkdirs") - if swift_linkdirs then - _g.ldflags = { "-L" .. swift_linkdirs } - end - end -- get the property function get(name) + -- init ldflags + if not _g.ldflags then + local swift_linkdirs = config.get("__swift_linkdirs") + if swift_linkdirs then + _g.ldflags = { "-L" .. swift_linkdirs } + end + end + -- get it return _g[name] end |
