summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-18 20:20:19 +0800
committerruki <[email protected]>2023-02-18 20:20:19 +0800
commit7c41b302ce315dde4ed031fa8ba5e406ea368b1a (patch)
tree07028a461f7f44887b7973f118f169fca5bac913 /xmake/modules
parent7e6d4d4a0e7cd67393757770d50e50558481349b (diff)
improve tools/meson
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/package/tools/meson.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index 102cdf6b9..17d203f02 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -81,9 +81,12 @@ function _get_cross_file(package, opt)
if ld then
file:print("ld=['%s']", executable_path(ld))
end
- local ar = package:build_getenv("ar")
- if ar then
- file:print("ar=['%s']", executable_path(ar))
+ -- we cannot pass link.exe to ar for msvc, it will raise `unknown linker`
+ if not package:is_plat("windows") then
+ local ar = package:build_getenv("ar")
+ if ar then
+ file:print("ar=['%s']", executable_path(ar))
+ end
end
local strip = package:build_getenv("strip")
if strip then