summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-11-26 00:46:11 +0800
committerruki <[email protected]>2022-11-26 00:46:11 +0800
commitbccf73f440098e64a92ea6bfd2aba0f04fbc9e35 (patch)
tree1ad120db1105f61799bd6deb3260f37ff179e8b6 /xmake/core/package/package.lua
parentc8eac266f1b3cce1f38b550da1fe3f9d02fd4d12 (diff)
enable exceptions by default in package
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index af523d2dc..a0af9f747 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1976,6 +1976,10 @@ function _instance:_generate_build_configs(configs, opt)
end
end
end
+ -- enable exceptions for msvc by default
+ if opt.sourcekind == "cxx" and configs.exceptions == nil and self:has_tool("cxx", "cl") then
+ configs.exceptions = "cxx"
+ end
if configs and (configs.ldflags or configs.shflags) then
configs.force = {ldflags = configs.ldflags, shflags = configs.shflags}
configs.ldflags = nil