summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/swiftc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/core/tools/swiftc.lua')
-rw-r--r--xmake/modules/core/tools/swiftc.lua16
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