diff options
| author | ruki <[email protected]> | 2018-04-09 23:47:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-04-09 16:42:31 +0800 |
| commit | fe78a523930b02f1e75c4490cdbae045d43d4f1a (patch) | |
| tree | a6db244e93c7447a8ae44b50f00c7950c6d9e1dc /xmake/modules | |
| parent | 05c127910b63882369acb354e7c4ca630fb4aca9 (diff) | |
improve warning flags for swiftc
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/swiftc.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/xmake/modules/core/tools/swiftc.lua b/xmake/modules/core/tools/swiftc.lua index 0be1cc4fd..d8b1e333c 100644 --- a/xmake/modules/core/tools/swiftc.lua +++ b/xmake/modules/core/tools/swiftc.lua @@ -36,8 +36,10 @@ function init(self) ["-fvisibility=hidden"] = "" -- warnings - , ["-w"] = "" - , ["-W.*"] = "" + , ["-w"] = "-suppress-warnings" + , ["-W%d*"] = "-warn-swift3-objc-inference-minimal" + , ["-Wall"] = "-warn-swift3-objc-inference-complete" + , ["-Werror"] = "-warnings-as-errors" -- optimize , ["-O0"] = "-Onone" @@ -101,11 +103,11 @@ function nf_warning(self, level) -- the maps local maps = { - none = "-w" - , less = "-W1" - , more = "-W3" - , all = "-Wall" - , error = "-Werror" + none = "-suppress-warnings" + , less = "-warn-swift3-objc-inference-minimal" + , more = "-warn-swift3-objc-inference-minimal" + , all = "-warn-swift3-objc-inference-complete" + , error = "-warnings-as-errors" } -- make it |
