summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2025-12-20 23:30:23 +0800
committerstar9029 <[email protected]>2025-12-20 23:30:23 +0800
commitd3a3a4d45e92a4b6af0438e0df81dce9d0bd4dc4 (patch)
tree837e489367a9b546737b9e4dda2d98857985f790 /xmake/modules/package/tools/cmake.lua
parent95363af8cefe003ed1599b124081a0d009f9fb8d (diff)
Refactor windows asan
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 6745ee5bb..7bf9b8b31 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -426,6 +426,10 @@ function _get_configs_for_generic(package, configs, opt)
if package:is_library() then
envs.BUILD_SHARED_LIBS = package:config("shared") and "ON" or "OFF"
end
+ -- https://cmake.org/cmake/help/latest/variable/CMAKE_LINKER_TYPE.html
+ if package:has_tool("ld", "link") then
+ envs.CMAKE_LINKER_TYPE = "MSVC"
+ end
_fix_zigcc_linker_cmake(package, envs)
_insert_configs_from_envs(configs, envs, opt)
end