summaryrefslogtreecommitdiff
path: root/xmake/core
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2025-02-24 14:41:50 +0800
committerstar9029 <[email protected]>2025-02-24 14:41:50 +0800
commitdc7a9621629cf94652338fd1f15d9cab412412bb (patch)
tree86325c8cad9f152263aaa02df513a3438ebbc844 /xmake/core
parent984fb1d67fe06fe71940bf7bb8dd92b12df486e2 (diff)
Fix clang-cl toolchain with lto
Diffstat (limited to 'xmake/core')
-rw-r--r--xmake/core/package/package.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 5b2a91be8..7abd5105a 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -2389,6 +2389,8 @@ function _instance:_generate_lto_configs(sourcekind)
local cflag = sourcekind == "cxx" and "cxxflags" or "cflags"
if cc == "cl" then
configs[cflag] = "-GL"
+ elseif cc == "clang_cl" then
+ configs[cflag] = "/clang:-flto=thin"
elseif cc == "clang" or cc == "clangxx" then
configs[cflag] = "-flto=thin"
elseif cc == "gcc" or cc == "gxx" then