From 69f7c4bddd42b6651bbe35619363daee63ab19df Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 25 May 2024 22:15:46 +0800 Subject: [PATCH] improve boost #4135 --- packages/b/boost/xmake.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/b/boost/xmake.lua b/packages/b/boost/xmake.lua index eb2d3ed5d62..edda7e4ce8e 100644 --- a/packages/b/boost/xmake.lua +++ b/packages/b/boost/xmake.lua @@ -222,11 +222,16 @@ package("boost") local build_toolset local runenvs if package:is_plat("windows") then - build_toolchain = package:toolchain("clang-cl") or package:toolchain("msvc") or - toolchain.load("msvc", {plat = package:plat(), arch = package:arch()}) - assert(build_toolchain:check(), "build toolchain not found!") - build_toolset = build_toolchain:name() == "clang-cl" and "clang-win" or "msvc" - runenvs = build_toolchain:runenvs() + if package:has_tool("cxx", "clang_cl") then + build_toolset = "clang-win" + build_toolchain = package:toolchain("clang-cl") + elseif package:has_tool("cxx", "cl") then + build_toolset = "msvc" + build_toolchain = package:toolchain("msvc") + end + if build_toolchain then + runenvs = build_toolchain:runenvs() + end end local file = io.open("user-config.jam", "w")